?? net5-2.frm
字號(hào):
VERSION 5.00
Begin VB.Form Form2
BorderStyle = 4 'Fixed ToolWindow
Caption = "歡迎光臨"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 270
ClientWidth = 4530
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4530
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "結(jié)束"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3240
TabIndex = 9
Top = 600
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "確定"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3240
TabIndex = 8
Top = 120
Width = 1095
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 7
Top = 2760
Width = 3015
End
Begin VB.Frame Frame1
Caption = "游戲的玩法"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1335
Left = 120
TabIndex = 3
Top = 1200
Width = 4335
Begin VB.OptionButton Option2
Caption = "我要加入一個(gè)連線棋局"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 5
Top = 840
Width = 2775
End
Begin VB.OptionButton Option1
Caption = "我要當(dāng)主機(jī)"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 4
Top = 360
Value = -1 'True
Width = 3015
End
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 2
Top = 600
Width = 1575
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "你的主機(jī)IP"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 120
TabIndex = 6
Top = 2760
Width = 1155
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "你的名字"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 120
TabIndex = 1
Top = 600
Width = 960
End
Begin VB.Label Label1
Caption = "歡迎光臨網(wǎng)絡(luò)五子棋"
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 2175
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Server = 1 Then
Form1.Winsock1.LocalPort = 5238
Form1.Winsock1.Listen
Form1.Label1(1).Caption = "黑子:" + Text1.Text
Form1.Label1(3).Caption = ""
Form1.Label2.Caption = "等待加入中"
Else
Form1.Winsock1.RemoteHost = Text2.Text
Form1.Winsock1.RemotePort = 5238
Form1.Winsock1.LocalPort = 0
Form1.Winsock1.Connect
Form1.Label1(1).Caption = ""
Form1.Label1(3).Caption = "白子:" + Text1.Text
Form1.Label2.Caption = "正在連線到主機(jī)"
End If
Form1.Label1(2).Caption = "戰(zhàn)績(jī):" + Str(Win(1)) + "勝" + Str(Lost(1)) + "敗"
Form1.Label1(4).Caption = "戰(zhàn)績(jī):" + Str(Win(2)) + "勝" + Str(Lost(2)) + "敗"
Form1.Show
Form1.Pic1.Enabled = False
Form1.Enabled = True
Form2.Hide
Unload Form2
ResetGame
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Form1.Enabled = False
CloseCom
Text2.Text = Form1.Winsock1.LocalIP
Server = 1
Win(1) = 0
Win(2) = 0
Lost(1) = 0
Lost(2) = 0
End Sub
Private Sub Option1_Click()
Label3.Caption = "你的主機(jī)IP"
Text2.Text = Form1.Winsock1.LocalIP
Server = 1
End Sub
Private Sub Option2_Click()
Label3.Caption = "連線主機(jī)IP"
Text2.Text = "0.0.0.0"
Server = 2
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -