Object yang harus dibuat :
|     No  |        Object  |        Properties  |        Value  |   
|     1  |        Form   1  |        Caption  |        Biodata  |   
|     Startup   position  |        2-center   Screen  |   ||
|     2  |        Label   1  |        Caption  |        Nama    |   
|     3  |        Label   2  |        Caption  |        Kelas    |   
|     4  |        Label   3  |        Caption  |        NPM     |   
|     5  |        Text   1  |        Text  |        |   
|     6  |        Text   2  |        Text  |        |   
|     7  |        Text   3  |        Text  |        |   
|     8  |        Label   4  |        Caption  |        |   
|     9  |        Label   5  |        Caption  |        |   
|     10  |        Label   6  |        Caption  |        |   
|     11  |        Command   1  |        Caption  |        Ok  |   
|     Name  |        Ok  |   ||
|     12  |        Command   2  |        Caption  |        Hapus  |   
|     Name  |        Hapus  |   ||
|     13  |        Command   3  |        Caption  |        Keluar  |   
|     Name  |        Keluar  | 
Input :
Code Program Pada Tombol OK
Private Sub Ok_Click()
Label4.Caption = "Nama Saya adalah" & Text1.Text
Label5.Caption = "NPM saya Adalah" & Text2.Text
Label6.Caption = "Kelas Saya adalah" & Text3.Text
End Sub
Code Program Pada Tombol Hapus
Private Sub Hapus_Click()
Label4.Caption = ""
Text1.Text =""
Label5.Caption = ""
Text2.Text =""
Label6.Caption = ""
Text3.Text =""
End Sub
Code Program Pada Tombol Keluar
Private Sub Keluar_Click()
End
End Sub
Membuat menu Popup pada Menu Editor
Code Program Pada Form
Private Sub Form_mouseup(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu Mnu
End If
End Sub
Code Program Pada Menu Font 16
Private Sub Mnu16_Click()
Label4.Font.Size = 16
Label5.Font.Size = 16
Label6.Font.Size = 16
End Sub
Code Program Pada Menu Font 18
Private Sub Mnu18_Click()
Label4.Font.Size = 18
Label5.Font.Size = 18
Label6.Font.Size = 18
End Sub
Code Program Pada Menu Color Red
Private Sub Mnured_Click()
Label4.ForeColor = vbRed
Label5.ForeColor = vbRed
Label6.ForeColor = vbRed
End Sub
Code Program Pada Menu Color Blue
Private Sub Mnublue_Click()
Label4.ForeColor = vbBlue
Label5.ForeColor = vbBlue
Label6.ForeColor = vbBlue
End Sub
Code Program Pada Menu Background Yellow
Private Sub Mnuyellow_Click()
Form1.BackColor = vbYellow
End Sub
Code Program Pada Menu Background Green
Private Sub Mnugreen_Click()
Form1.BackColor = vbgreen
End Sub
Code Program ada Menu Exit
Private Sub Mnuexit_Click()
End
End Sub
Output :
   




2 komentar:
wuih jago lo komang,hebat2,ahah,lanjutkan,,knjngi blog gue juga ya,ahaha
Posting Komentar