Jumat, 11 November 2011

Visual Basic Belajar Code




Contohnya :



 Private Sub Command1_click   

    Label1.Visible=false 


    Label2.Visible=True


    Text1.Text=”Ini Lable 2"

End sub



Private Sub - End Sub --> awal dan penutup prosedure





command1_click --> object command button di event click



Label1.Visible=false --> object.property=value  



object --> seperti : label, textBox, ComboBox, CommandButton, dll



Property --> seperti : color, Font, Enable (Tidak Aktif namun masih terlihat) , Visble (Aktif  namun tidak terlihat) , dll



value --> seperi : false , true ,"text", 1 , 0 , vbred (Untuk Warna) , vbYes (Untuk Tombol Yes), dll


 lihat gambar di bawah ini :





  Klik 2x pada button maka akan tampil seperti ini





 jika penulisan object benar maka akan muncul seperti ini




 contoh penulisan :


  Private Sub Command1_click

    Label1.Caption=” Welcome”

    Image1.visible=true

  End sub



  Private Sub Command1_click

    Pictuire1.Show=true

    Timer1.Enabled=True

    text1.text="Waiting"

  End sub

Tidak ada komentar:

Posting Komentar