Followers

http://www.youtube.com/user/81djoko?feature=mhee Adsense Indonesia Adsense Indonesia

Menbuat tak tik tiga dengan mengunakan vb

sedikit kita mencoba- coba untuk mengingat permainan lama jadi permainan baru
lho kok lama => baru gimana ceritanya, pernah mengingat permainan yang sudah usang tapi masih diminati anak - anak masa kini permainan tiga (3)

sekarang kita mencoba membuktikan cara menggunakan dan mempermainkan, membuat program dengan menggunakan vb.

caranya :

buka program vb dulu setelah itu masukkan tootl yang akan digunakan
untuk membantu membuat permainan tersebut.
bantuan:
timer interval,frame,label dan picture/image
setelah itu masukan sedikit program yang akan di tulis dibawah ini ??
kalau belum mudeng -mudeng amat ??
pelajari sek sama tidak usah ter gesa-gesa

Listing Program


Dim sp1 As Boolean 'Variabel untuk Pemain 1
Dim sp2 As Boolean 'Variabel untuk Pemain 2
Dim p1p As Integer 'Points pemain 1
Dim p2p As Integer 'Points Pemain 2
Function lösch()
'Fungsi sembunyikan semua gambar
O1.Visible = False
O2.Visible = False
O3.Visible = False
O4.Visible = False
O5.Visible = False
O6.Visible = False
O7.Visible = False
O8.Visible = False
O9.Visible = False
X1.Visible = False
X2.Visible = False
X3.Visible = False
X4.Visible = False
X5.Visible = False
X6.Visible = False
X7.Visible = False
X8.Visible = False
X9.Visible = False
End Function
Private Sub Image1_Click()
If sp1 = True And O1.Visible = False Then
X1.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X1.Visible = False Then
O1.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Form_Load()
'Settting Pemain 1
sp1 = True
sp2 = False
'Buat semua gambar visible
X1.Visible = False
X2.Visible = False
X3.Visible = False
X4.Visible = False
X5.Visible = False
X6.Visible = False
X7.Visible = False
X8.Visible = False
X9.Visible = False
O1.Visible = False
O2.Visible = False
O3.Visible = False
O4.Visible = False
O5.Visible = False
O6.Visible = False
O7.Visible = False
O8.Visible = False
O9.Visible = False
End Sub
Private Sub Image2_Click() 'Di Click gambar jadi Visible
If sp1 = True And O2.Visible = False Then
X2.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X2.Visible = False Then
O2.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image3_Click()
If sp1 = True And O3.Visible = False Then
X3.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X3.Visible = False Then
O3.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image4_Click()
If sp1 = True And O4.Visible = False Then
X4.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X4.Visible = False Then
O4.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image5_Click()
If sp1 = True And O5.Visible = False Then
X5.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X5.Visible = False Then
O5.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image6_Click()
If sp1 = True And O6.Visible = False Then
X6.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X6.Visible = False Then
O6.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image7_Click()
If sp1 = True And O7.Visible = False Then
X7.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X7.Visible = False Then
O7.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image8_Click()
If sp1 = True And O8.Visible = False Then
X8.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X8.Visible = False Then
O8.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub

Tidak ada komentar: