หน้าแรก
 การบ้าน
  C/C++ new
  Java new
  Windows Phone
  แจ้งเรื่องที่ต้องการ
 บทความ
  .NET
  Android
  Blackberry
  C++Builder
  Delphi
  Java
  Mobile
  Open Source
  Pocket PC
  Visual Basic
  Web
  Windows Phone
  Others
 แบบเรียนฟรี
  ASP
  ASP.NET Webmatrix
  C++
  eVB
  J2ME
  Java
  PHP
 ซอร์สโค้ด
  Android
  ASP
  C++
  VC++
  CGI-Perl
  Delphi
  Java
  jQuery
  PHP
  Visual Basic
  .NET
 บริการจากเรา
  เปิดท้าย... ขายโค้ด
  Freeware
  อัตราค่าโฆษณา
  รายชื่อลูกค้า
  สถิติผู้เข้าเว็บ
 ดาว์นโหลด
 ค้นหาข้อมูล
 กระดานสนทนา
  .NET
  C/C++
  Delphi
  Java
  Palm/PocketPC
  Visual Basic
  Web
  อื่นๆ
 กระดานงาน
 ลิงค์เว็บ
 เกี่ยวกับผม
 อัตราค่าโฆษณา
Social Network

Facebook  Twitter  YouTube
 New Article
 Webboard
 Freelanceboard
Freeware
โปรแกรมเบอร์ดี (BerDee)
โปรแกรมเบอร์ดี (Android)
เกมส์เป่ายิ้งฉุบ
เกมส์เป่ายิ้งฉุบ(Android)
WebcamMonitor
WebcamMonitor(Windows)
scSendMail
scSendMail(Windows)
MSN Caption
MSN Caption(Windows)
  Freelance comment
  ติดต่อสอบถามมาได้ตลอดนะ...
2015-07-29 13:35:58
  ถ้าผมต้องการเว็บที่พัฒน...
2015-01-18 15:33:54
  ถ้าผมต้องการเว็บที่พัฒน...
2015-01-18 15:32:51
  ติดต่อสอบถามเข้ามาได้นะ...
2014-01-06 12:47:38
  ถ้ายังหาคนสอนไม่ได้ ก็ลอ...
2013-07-06 01:04:37
  สนใจส่งขอบเขตมาคุยราคาก...
2013-03-24 18:54:20
  ถ้ายังไม่มีคนรับงานติดต...
2012-12-16 19:18:14
  สนใจคะ ติดต่อ 0905076277...
2012-11-12 11:07:46
  รับทำโปรเจ็คนักศึกษาหรื...
2012-10-29 03:10:46
  sukit_te34@hotmail.com...
2012-10-29 03:09:36
  Webboard comment
  เขียนโปรแกรมภาษาจาวา
1.โ...

2023-09-12 11:40:28
  ต้องลอง debug ดูเองครับ
ไล่...

2023-06-08 18:03:06
  ร้านค้าแห่งหนึ่ง จะต้องน...
2021-09-21 08:47:08
  จงเขียนโปรแกรมดำเนินการ...
2021-05-07 15:06:11
  จงเขียนโปรแกรมสำหรับคำน...
2021-03-09 14:21:45
  ขอดู...
2021-01-04 23:56:45
  ขอโค้ดเพื่อทำการเรียนกา...
2020-12-09 23:02:09
  แล้ว ?...
2020-12-09 10:56:34
  จ้า...
2020-10-18 16:53:21
  พอดีผมเหลื่อแค่ตัดสต๊อก...
2020-05-31 21:49:43
  Homework comment
  เขียนโปรแกรมเพื่อรับค่า...
2022-02-24 10:45:17
  จากโค้ดนี้อะครับ พอดีลอง...
2021-03-22 01:22:39
  จากโค้ดนี้อะครับ พอดีลอง...
2021-03-22 01:22:39
  โจทย์การบ้าน c++ เขียนรูปแ...
2020-04-06 11:01:33
  แบบนี้ขอเป็น ภาษา php หน่อย...
2019-09-18 14:36:34
  ผมไม่อยากให้คุณได้คะแนน...
2019-04-27 01:29:07
  อาจารย์เขาบอกแนวข้อสอบม...
2019-04-27 00:44:29
  ขอสอบถามการเขียน c++ ครับ เ...
2018-04-02 12:19:21
  โค้ดตัวอย่างศึกษาให้เข้...
2017-11-26 14:50:05
  คำนวณค่าน้ำโดยรับค่ามิเ...
2017-11-20 23:15:26
  Article comment
  เท่าที่อ่าน error คือพื้นที่...
2022-03-23 13:56:48
  เรียน สอบถามปัญหา กับ อ.คร...
2022-01-24 17:39:49
  ต้องการ ให้เขียน โปรแกรม ...
2019-12-09 11:39:58
  รับเขียน arx จาก vc++ 2017 ล็อคโปร...
2019-09-19 09:48:09
  ทำการ register ไฟล์ที่ชื่อ mswinsck.oc...
2019-09-17 14:05:56
  ใน vb 6 ไม่มี component winsock เลยค่ะ ส...
2019-09-03 10:31:02
  รบกวนขอสอบถามหน่อยนะครั...
2019-03-04 05:31:04
  สามารถนำตัวหนังสือจากภา...
2018-12-25 08:54:32
  มีcode ของ VB ไหมค่ะ ถ้ามีรบกว...
2017-09-28 16:50:02
  น่าจะได้ครับ ไม่เคยลอง
...

2017-07-11 09:59:35
  9Mcode comment

Link Exchange

อัตราค่าโฆษณา
 
 Webboard

- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -

กระทู้ #1994 [.NET] (จาก IP: 202.149.24.129)

ขอโค้ดเกม OX

อยากได้โค้ดเกม OX แบบเล่นกับคอมค่ะใช้ VB . NET ค่ะใครพอมีบ้างช่วยบอกหน่อยนะค่ะต้องทำเป็นโปรเจ็คส่งอาจารย์ค่ะ
จากคุณ : nan / dongpron_kai@hotmail.com [2008-05-03 03:59:31]  

58.8.251.160 ความคิดเห็น #26721 (จาก IP: 58.8.251.160)
Dim b1, b2, b3, b4, b5, b6, b7, b8, b9 As Integer
Dim result As String

Sub checkO()
If Command1.Caption = "O" And Command2.Caption = "O" And Command3.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
ElseIf Command4.Caption = "O" And Command5.Caption = "O" And Command6.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
ElseIf Command7.Caption = "O" And Command8.Caption = "O" And Command9.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
ElseIf Command1.Caption = "O" And Command4.Caption = "O" And Command7.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
ElseIf Command2.Caption = "O" And Command5.Caption = "O" And Command8.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command1.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command9.Enabled = False
ElseIf Command3.Caption = "O" And Command6.Caption = "O" And Command9.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
ElseIf Command1.Caption = "O" And Command5.Caption = "O" And Command9.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
ElseIf Command3.Caption = "O" And Command5.Caption = "O" And Command7.Caption = "O" Then
Label1.Caption = "ผู้เล่นที่ 2 ชนะ"
Option1.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
End If
End Sub

Sub checkX()
If Command1.Caption = "X" And Command2.Caption = "X" And Command3.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
ElseIf Command4.Caption = "X" And Command5.Caption = "X" And Command6.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
ElseIf Command7.Caption = "X" And Command8.Caption = "X" And Command9.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
ElseIf Command1.Caption = "X" And Command4.Caption = "X" And Command7.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
ElseIf Command2.Caption = "X" And Command5.Caption = "X" And Command8.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command1.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command9.Enabled = False
ElseIf Command3.Caption = "X" And Command6.Caption = "X" And Command9.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
ElseIf Command1.Caption = "X" And Command5.Caption = "X" And Command9.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
ElseIf Command3.Caption = "X" And Command5.Caption = "X" And Command7.Caption = "X" Then
Label1.Caption = "ผู้เล่นที่ 1 ชนะ"
Option2.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
End If
End Sub

Sub checkdraw()
If Command1.Caption <> "" And Command2.Caption <> "" And Command3.Caption <> "" And Command4.Caption <> "" And Command5.Caption <> "" And Command6.Caption <> "" And Command7.Caption <> "" And Command8.Caption <> "" And Command9.Caption <> "" And Label1.Caption = "" Then
Label1.Caption = "เสมอกัน"
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
result = Label1.Caption
End If
End Sub

Private Sub Command1_Click()
If b1 = 0 Then
If Option1 = True Then
Command1.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command1.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b1 = b1 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub


Private Sub Command2_Click()
If b2 = 0 Then
If Option1 = True Then
Command2.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command2.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b2 = b2 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Command3_Click()
If b3 = 0 Then
If Option1 = True Then
Command3.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command3.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b3 = b3 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Command4_Click()
If b4 = 0 Then
If Option1 = True Then
Command4.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command4.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b4 = b4 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Command5_Click()
If b5 = 0 Then
If Option1 = True Then
Command5.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command5.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b5 = b5 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Command6_Click()
If b6 = 0 Then
If Option1 = True Then
Command6.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command6.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b6 = b6 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Command7_Click()
If b7 = 0 Then
If Option1 = True Then
Command7.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command7.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b7 = b7 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Command8_Click()
If b8 = 0 Then
If Option1 = True Then
Command8.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command8.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b8 = b8 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Command9_Click()
If b9 = 0 Then
If Option1 = True Then
Command9.Caption = "X"
Option2 = True
Option1.Enabled = False
Option2.Enabled = True
Else
Command9.Caption = "O"
Option1 = True
Option2.Enabled = False
Option1.Enabled = True
End If
checkO
checkX
checkdraw
b9 = b9 + 1
result = Label1.Caption
Else
MsgBox "ช่องนี้ได้มีการกาไปเรียบร้อยแล้วครับ", vbCritical, "ผิดพลาด"
End If
End Sub

Private Sub Form_Load()
Option1 = True
Option2.Enabled = False

End Sub

Private Sub mmabout_Click(Index As Integer)
MsgBox "เกม XO เวอร์ชั่น 1.0 โดย ด.ช.ศิลป์ สัจจะวัฒนวิมล", vbInformation, "เกี่ยวกับ"
End Sub

Private Sub mmexit_Click(Index As Integer)
Dim answer As Integer
answer = MsgBox("คุณแน่ใจหรือว่าต้องการจะออกจากโปรแกรม ?", vbQuestion + vbOKCancel, "ออกจากโปรแกรม")
If answer = 1 Then
End
End If
End Sub

Private Sub mmlastscore_Click(Index As Integer)
If result <> "" Then
MsgBox "ในรอบที่ผ่านมา" + " " + result + " " + "ครับ", vbInformation, "ผลในรอบที่ผ่านมา"
Else
MsgBox "ยังไม่มีการเริ่มเล่นเกมครับ", vbInformation, "ผลในรอบที่ผ่านมา"
End If
End Sub

Private Sub mmnew_Click(Index As Integer)
Command1.Caption = ""
Command2.Caption = ""
Command3.Caption = ""
Command4.Caption = ""
Command5.Caption = ""
Command6.Caption = ""
Command7.Caption = ""
Command8.Caption = ""
Command9.Caption = ""
Label1.Caption = ""
Option1.Enabled = True
Option2.Enabled = False
Option1 = True
b1 = 0
b2 = 0
b3 = 0
b4 = 0
b5 = 0
b6 = 0
b7 = 0
b8 = 0
b9 = 0
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
End Sub
จากคุณ : sup98 [2008-05-03 10:26:21]

202.176.107.90 ความคิดเห็น #27663 (จาก IP: 202.176.107.90)
อยากได้โค้ด XO ที่เป็น C อ่าค่ะ
จากคุณ : jazziii / poohza@windowslive.com [2009-12-18 02:13:38]
ตอบกระทู้
  • ห้ามการโฆษณา หากต้องการติดต่อหาลูกค้า ติดต่อโฆษณาโดยตรงได้ที่ webmaster@sourcecode.in.th
  • ห้ามใช้คำหยาบและคำพูดที่ไม่เหมาะสม
  • ขอสงวนสิทธิหากตรวจพบ ข้อความที่ไม่เหมาะสม ข้อความนั้นจะถูกลบทันที
ชื่อ
อีเมล์
รายละเอียด

- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -

 
 
คลิปสอนเขียนโปรแกรม
เรียนเขียนโปรแกรมดอทเน็ต
เรียนเขียนโปรแกรมแอนดรอยด์
เรียนเขียนโปรแกรมเบล็คเบอร์รี่
เรียนเขียนโปรแกรมซี ซีพลัสพลัส
เรียนเขียนโปรแกรมจาวา
เรียนการใช้งานลินุกส์
เรียนการเขียนโปรแกรมวินโดว์โฟน
เรียนการเขียนโปรแกรมพีเฮชพี มายเอสคิวเอล
อัตราค่าโฆษณา
 
Tutorial
eVB Tutorial
ASP.NET Webmatrix Tutorial
J2ME Tutorial
C++  Tutorial
Java  Tutorial
PHP Tutorial
ASP Tutorial
 
แบบสำรวจ

Home - Article - Tutorial - Sourcecode - Dev Handbook - Search - WebBoard - Links - About Us

สงวนลิขสิทธิ์ ห้ามคัดลอก ทำซ้ำ แก้ไข ดัดแปลง ไม่ว่าในรูปแบบใด โดยไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร
เลขทะเบียนพาณิชย์อิเล็กทรอนิกส์จากกระทรวงพาณิชย์: 7100503002000
Copyright 2001 SourceCode.in.th