Saturday, January 30, 2016

KODING(CODE/KODE) MEMBUAT PROGRAM BLOK SITUS VB6.0





UNTUK TEXTAREA
++++++++++++++++++++++++++++++++++++++++
Private Sub Text1_GotFocus ()     
Text1.SelStart = 0           
Text1.SelLength = Len(Text1.text)
End Sub                 
++++++++++++++++++++++++++++++++++++++++


UNTUK BUTTON TAMBAH
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Command1_Click ()                   
Dim i As Integer                       
i = FreeFile                           
Open ("C:\Windows\System32\Drivers\etc\hosts") For Append As #i   
Print #i, "127.0.0.1 "; Text1.text               
Text1 = ""                           
Text.Setfocus                           
Close #i                           
End Sub                               
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


UNTUK BUTTON SEGARKAN
+++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Command_Click ()           
shell ("ipconfig /flushdns"), vbNormalFocus   
End Sub                       
+++++++++++++++++++++++++++++++++++++++++++++++++


UNTUK BUTTON LIHAT
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Command3_Click ()                       
shell ("notepad c:\windows\system32\drivers\etc\hosts"), vbNormalFocus   
End Sub                                   
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


UNTUK BUTTON BERSIHKAN
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Command4_Click ()                     
Dim i As Integer                          
i =  FreeFile                              
Open ("c:\windows\system32\drivers\etc\hosts") For Output As #i       
Print #i, Text1.text                           
Close #i                               
End Sub                               
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


UNTUK BUTTON BANTUAN
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Command5_Click ()                       
Shell ("explorer c:\windows\system32\drivers\etc"), vbNormalFocus  
End Sub                                   
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

No comments: