📄 frmconnect.frm
字号:
VERSION 5.00
Begin VB.Form frmConnect
BorderStyle = 3 'Fixed Dialog
Caption = "连接服务器"
ClientHeight = 1476
ClientLeft = 2760
ClientTop = 3756
ClientWidth = 4860
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1476
ScaleWidth = 4860
ShowInTaskbar = 0 'False
Begin VB.TextBox Text2
Height = 375
Left = 780
TabIndex = 6
Text = "23"
Top = 870
Width = 2475
End
Begin VB.TextBox Text1
Height = 345
Left = 780
TabIndex = 2
Text = "10.12.13.66"
Top = 480
Width = 2475
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 3390
TabIndex = 1
Top = 870
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "连接"
Height = 375
Left = 3390
TabIndex = 0
Top = 450
Width = 1215
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "端口:"
Height = 195
Left = 150
TabIndex = 5
Top = 990
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "地址:"
Height = 195
Left = 180
TabIndex = 4
Top = 540
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请输入远程地址和端口号:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 120
TabIndex = 3
Top = 90
Width = 2160
End
End
Attribute VB_Name = "frmConnect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim IP As String, Port As Integer, mvarAction As Command
'Public Enum Command
' comdOK
' comdCancel
'End Enum
Public Property Let Action(ByVal vData As Command)
mvarAction = vData
End Property
Public Property Get Action() As Command
Action = mvarAction
End Property
Public Property Get IPAddress() As String
IPAddress = IP
End Property
Public Property Get PortNum() As Integer
PortNum = Port
End Property
Public Property Let IPAddress(ByVal tempIP As String)
IP = tempIP
End Property
Public Property Let PortNum(ByVal tempPort As Integer)
Port = tempPort
End Property
Private Sub CancelButton_Click()
mvarAction = comdCancel
Unload Me
End Sub
Private Sub OKButton_Click()
If Trim(Text1.Text) <> "" Then
IP = Trim(Text1.Text)
Else
MsgBox "请输入远程服务器地址!"
Exit Sub
End If
If Trim(Text2.Text) <> "" Then
Port = CInt(Text2.Text)
Else
MsgBox "请输入远程服务器端口!"
Exit Sub
End If
mvarAction = comdOK
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -