Wednesday, February 13, 2013

contoh games sederhana


Ni dia codingnya cuy....
//Listing
Private Sub Command1_Click()
a = Int(Rnd * 10)
Text2.Text = a
Text1.SetFocus
If Text2.Text = Text1.Text Then
Label1.Caption = "Tebakan Anda Benar"
MsgBox "Jactpot", VbOnly + vbInformation, "Hasil"
Else
Label1.Caption = "Anda Salah"
MsgBox "Try Again", vbExclamation, "Hasil"
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Label2.Caption = "Masukkan Angka 0-9"
Text1.Text = ""
Text2.Text = ""
Command1.Caption = "Enter"
Command2.Caption = "Clear"
Command3.Caption = "Exit"
Label1.Caption = ""
End Sub
Private Sub Timer1_Timer()
Label2.ForeColor = QBColor(Rnd * 15)
Label1.BackColor = QBColor(Rnd * 15)
 
Dan ini bentuk tampilan games nya...
 
 
End Sub

0 komentar:

Post a Comment

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com