Buat form y seperti berikut :
Objek
|
Caption
|
Form1
|
Form1
|
Label1
|
Biodata
|
Label2
|
Nim
|
Label3
|
Nama
|
Label4
|
Alamat
|
Label5
|
No_Hp
|
Command Button1
|
Tampil
|
Command Button2
|
Bersih
|
Command Button3
|
Keluar
|
Text1
|
Name:txtnim
|
Text2
|
Name:txtnm
|
Text3
|
Name:txtal
|
Text4
|
Name:txthp
|
Private Sub CmdTampil_Click()
TxtNim.Text
= "12129322"
TxtNim.FontName
= "Kristen ITC"
TxtNim.FontSize
= "12"
TxtNm.Text
= "Mardiyanti"
TxtNm.FontName
= "Kristen ITC"
TxtNm.FontSize
= "11"
TxtAl.Text
= "Tasikmalaya"
TxtAl.FontName
= "Kristen ITC"
TxtAl.FontSize
= "10"
TxtHp.Text
= "008xxxxxx"
End Sub
Private Sub CmdBersih_Click()
TxtNim.Text
= ""
TxtNm.Text
= ""
TxtAl.Text
= ""
TxtHp.Text
= ""
End Sub
Private Sub CmdKeluar_Click()
x =
MsgBox("yakin anda mau keluar?", vbOKCancel + vbQuestion,
"intan")
If x =
vbOK Then Unload Me
End Sub
Ini dia Hasilnya :
Selamat Mencoba ^_^
0 komentar:
Posting Komentar