?? frmlogin.frm
字號:
VERSION 5.00
Begin VB.Form frmLogin
Caption = "登錄"
ClientHeight = 3555
ClientLeft = 60
ClientTop = 345
ClientWidth = 3960
Icon = "frmLogin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3555
ScaleWidth = 3960
StartUpPosition = 3 '窗口缺省
Begin VB.OptionButton optnGuest
Caption = "未注冊用戶登錄"
Height = 255
Left = 1920
TabIndex = 3
Top = 1080
Width = 1695
End
Begin VB.OptionButton optnUser
Caption = "用戶登錄"
Height = 255
Left = 480
TabIndex = 2
Top = 1080
Value = -1 'True
Width = 1335
End
Begin VB.Frame Frame1
Height = 1215
Left = 240
TabIndex = 9
Top = 1560
Width = 3375
Begin VB.TextBox txtName
Height = 270
Left = 960
MaxLength = 20
TabIndex = 5
Top = 360
Width = 2175
End
Begin VB.TextBox txtPwd
Height = 270
IMEMode = 3 'DISABLE
Left = 960
MaxLength = 20
PasswordChar = "*"
TabIndex = 6
Top = 720
Width = 2175
End
Begin VB.Label Label4
Caption = "用戶名:"
Height = 255
Left = 120
TabIndex = 11
Top = 360
Width = 735
End
Begin VB.Label Label5
Caption = "密碼:"
Height = 255
Left = 120
TabIndex = 10
Top = 720
Width = 615
End
End
Begin VB.CommandButton cmdLogin
Caption = "登錄到服務(wù)器上……"
Default = -1 'True
Height = 375
Left = 240
TabIndex = 7
Top = 3000
Width = 3375
End
Begin VB.TextBox txtHost
Height = 270
Left = 1320
MaxLength = 50
TabIndex = 0
Top = 240
Width = 2295
End
Begin VB.TextBox txtPort
Height = 270
Left = 1320
MaxLength = 6
TabIndex = 1
Top = 600
Width = 735
End
Begin VB.Label Label2
Caption = "服務(wù)器地址:"
Height = 255
Left = 240
TabIndex = 8
Top = 240
Width = 1215
End
Begin VB.Label Label3
Caption = "端口號:"
Height = 240
Left = 240
TabIndex = 4
Top = 600
Width = 855
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdLogin_Click()
If txtHost.Text = "" Then
MsgBox "請?zhí)顚懛?wù)器地址!", vbInformation, "登錄"
txtHost.SetFocus
Exit Sub
ElseIf txtPort.Text = "" Or Not IsNumeric(txtPort.Text) Then
MsgBox "請正確填寫端口號!", vbInformation, "登錄"
txtPort.SetFocus
Exit Sub
ElseIf txtName.Text = "" And optnUser.Value Then
MsgBox "請?zhí)顚懹脩裘?quot;, vbInformation, "注冊"
txtName.SetFocus
Exit Sub
ElseIf txtPwd.Text = "" And optnUser.Value Then
MsgBox "請?zhí)顚懨艽a!", vbInformation, "注冊"
txtPwd.SetFocus
Exit Sub
End If
'收集信息
g_strRemoteHost = txtHost.Text
g_intPort = CLng(txtPort.Text)
If optnUser Then
g_Control = LOGINSERVER
g_strName = txtName.Text
g_strPwd = txtPwd.Text
g_selfName = g_strName
g_selfPwd = g_strPwd
Else
g_Control = REGCONTROL
End If
'連接服務(wù)器
ConnectRemoteHost txtHost.Text, CLng(txtPort.Text)
End Sub
Private Sub Form_Load()
frmLogin.Height = 4000
End Sub
Private Sub optnGuest_Click()
Frame1.Visible = False
frmLogin.Height = frmLogin.Height - Frame1.Height - 200
cmdLogin.Top = Frame1.Top
End Sub
Private Sub optnUser_Click()
Frame1.Visible = True
frmLogin.Height = frmLogin.Height + Frame1.Height + 200
cmdLogin.Top = cmdLogin.Top + Frame1.Height + 200
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -