9Mcode comment |
|
|
|
|
|
|
- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -
|
|
|
กระทู้ #3327 [Vb] (จาก IP: 125.25.203.141)
ขอโค๊ดเกมส์ OX (VB 2008) หน่อยได้มั้ยค่ะ
ขอโค๊ดเกมส์ OX (VB 2008) หน่อยได้มั้ยค่ะ คือจะทำโปรเจคส่งอาจารอ่ะคะ..แต่งง ... ขอบคุณล่วงหน้า มากๆๆๆ..นะคะ
|
จากคุณ
:
MarinE / padrock_bm23@hotmail.com [2012-07-22 23:25:15]
|
|
ความคิดเห็น #28661 (จาก IP: 223.206.235.236)
1. สร้าง Button ขึ้นมา 9 ตัว 2. ก็อปโค้ดไปวาง 3. แอดไฟล์ Module1 เข้ามา และก็อปโค้ดสุดท้ายไปวาง
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Button1.Text = "" Then Button1.Text = Module1.WhoIs If Button1.Text <> "" And Button1.Text = Button2.Text And Button2.Text = Button3.Text Then MsgBox(Button1.Text & " WIN") ElseIf Button1.Text <> "" And Button1.Text = Button5.Text And Button5.Text = Button9.Text Then MsgBox(Button1.Text & " WIN") ElseIf Button1.Text <> "" And Button1.Text = Button4.Text And Button4.Text = Button7.Text Then MsgBox(Button1.Text & " WIN") End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Button2.Text = "" Then Button2.Text = Module1.WhoIs If Button2.Text <> "" And Button2.Text = Button3.Text And Button3.Text = Button1.Text Then MsgBox(Button2.Text & " WIN") ElseIf Button2.Text <> "" And Button2.Text = Button5.Text And Button5.Text = Button8.Text Then MsgBox(Button2.Text & " WIN") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Button3.Text = "" Then Button3.Text = Module1.WhoIs If Button3.Text <> "" And Button3.Text = Button2.Text And Button2.Text = Button1.Text Then MsgBox(Button3.Text & " WIN") ElseIf Button3.Text <> "" And Button3.Text = Button5.Text And Button5.Text = Button7.Text Then MsgBox(Button3.Text & " WIN") ElseIf Button3.Text <> "" And Button3.Text = Button6.Text And Button6.Text = Button9.Text Then MsgBox(Button3.Text & " WIN") End If End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click If Button4.Text = "" Then Button4.Text = Module1.WhoIs If Button4.Text <> "" And Button4.Text = Button5.Text And Button5.Text = Button6.Text Then MsgBox(Button4.Text & " WIN") ElseIf Button4.Text <> "" And Button1.Text = Button4.Text And Button4.Text = Button7.Text Then MsgBox(Button4.Text & " WIN") End If End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If Button5.Text = "" Then Button5.Text = Module1.WhoIs If Button5.Text <> "" And Button2.Text = Button5.Text And Button5.Text = Button8.Text Then MsgBox(Button5.Text & " WIN") ElseIf Button5.Text <> "" And Button4.Text = Button5.Text And Button5.Text = Button6.Text Then MsgBox(Button5.Text & " WIN") ElseIf Button5.Text <> "" And Button1.Text = Button5.Text And Button5.Text = Button9.Text Then MsgBox(Button5.Text & " WIN") ElseIf Button5.Text <> "" And Button3.Text = Button5.Text And Button5.Text = Button7.Text Then MsgBox(Button5.Text & " WIN") End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If Button6.Text = "" Then Button6.Text = Module1.WhoIs If Button6.Text <> "" And Button3.Text = Button6.Text And Button6.Text = Button9.Text Then MsgBox(Button6.Text & " WIN") ElseIf Button6.Text <> "" And Button4.Text = Button5.Text And Button5.Text = Button6.Text Then MsgBox(Button6.Text & " WIN") End If End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If Button7.Text = "" Then Button7.Text = Module1.WhoIs If Button7.Text <> "" And Button7.Text = Button8.Text And Button8.Text = Button9.Text Then MsgBox(Button7.Text & " WIN") ElseIf Button7.Text <> "" And Button3.Text = Button5.Text And Button5.Text = Button7.Text Then MsgBox(Button7.Text & " WIN") ElseIf Button7.Text <> "" And Button1.Text = Button4.Text And Button4.Text = Button7.Text Then MsgBox(Button7.Text & " WIN") End If End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click If Button8.Text = "" Then Button8.Text = Module1.WhoIs If Button8.Text <> "" And Button7.Text = Button8.Text And Button8.Text = Button9.Text Then MsgBox(Button8.Text & " WIN") ElseIf Button8.Text <> "" And Button2.Text = Button5.Text And Button5.Text = Button8.Text Then MsgBox(Button8.Text & " WIN") End If End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click If Button9.Text = "" Then Button9.Text = Module1.WhoIs If Button9.Text <> "" And Button7.Text = Button8.Text And Button8.Text = Button9.Text Then MsgBox(Button9.Text & " WIN") ElseIf Button9.Text <> "" And Button1.Text = Button5.Text And Button5.Text = Button9.Text Then MsgBox(Button9.Text & " WIN") ElseIf Button9.Text <> "" And Button3.Text = Button6.Text And Button6.Text = Button9.Text Then MsgBox(Button9.Text & " WIN") End If End Sub End Class
ส่วนของไฟล์โมดูล Module Module1 Dim Busy As Boolean Function WhoIs() As String Busy = Not Busy WhoIs = IIf(Busy, "O", "X") End Function End Module |
จากคุณ
:
แคทอาย / patomchet@hotmail.com [2012-07-27 15:19:56]
|
|
ความคิดเห็น #28662 (จาก IP: 125.25.200.211)
ขอบคุณมากๆๆ ค่าาาาา...^^ |
จากคุณ
:
MarinE / padrock_bm23@hotmail.com [2012-07-27 22:39:53]
|
|
ความคิดเห็น #28674 (จาก IP: 202.29.21.52)
ทำแล้วมันไม่ได้อะคับ ปุ่มมันขึ้น button แล้วจะเป็น o x ยังไงคับ งง |
จากคุณ
:
แบ้ง / systemjek@hotmail.com [2012-09-02 15:47:48]
|
|
|
- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -
|
|
|
|
|
|
|