frmoptions.frm
来自「使用VB仿QQ界面开发的ICQ程序,采用C/S结架,实现简单文字聊天.」· FRM 代码 · 共 344 行
FRM
344 行
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmOptions
BorderStyle = 3 'Fixed Dialog
Caption = "Options"
ClientHeight = 4920
ClientLeft = 2565
ClientTop = 1500
ClientWidth = 6150
Icon = "frmOptions.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4920
ScaleWidth = 6150
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MessengerProject.LaVolpeButton cmdCancel
Height = 375
Left = 4920
TabIndex = 18
Top = 4440
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BTYPE = 3
TX = "取消(&C)"
ENAB = -1 'True
BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Times New Roman"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
COLTYPE = 1
BCOL = 13160660
FCOL = 0
FCOLO = 0
EMBOSSM = 12632256
EMBOSSS = 16777215
MPTR = 0
MICON = "frmOptions.frx":000C
ALIGN = 1
ICONAlign = 0
ORIENT = 0
STYLE = 0
IconSize = 2
SHOWF = -1 'True
BSTYLE = 0
OPTVAL = 0 'False
OPTMOD = 0 'False
GStart = 0
GStop = 16711680
GStyle = 0
End
Begin MessengerProject.LaVolpeButton cmdOK
Height = 375
Left = 3720
TabIndex = 17
Top = 4440
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BTYPE = 3
TX = "确定(&O)"
ENAB = -1 'True
BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Times New Roman"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
COLTYPE = 1
BCOL = 13160660
FCOL = 0
FCOLO = 0
EMBOSSM = 12632256
EMBOSSS = 16777215
MPTR = 0
MICON = "frmOptions.frx":0028
ALIGN = 1
ICONAlign = 0
ORIENT = 0
STYLE = 0
IconSize = 2
SHOWF = -1 'True
BSTYLE = 0
OPTVAL = 0 'False
OPTMOD = 0 'False
GStart = 0
GStop = 16711680
GStyle = 0
End
Begin TabDlg.SSTab SSTab1
Height = 4215
Left = 120
TabIndex = 6
Top = 120
Width = 5895
_ExtentX = 10398
_ExtentY = 7435
_Version = 393216
Style = 1
Tabs = 2
TabHeight = 520
TabCaption(0) = "系统设置"
TabPicture(0) = "frmOptions.frx":0044
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Check1"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).ControlCount= 1
TabCaption(1) = "网络设置"
TabPicture(1) = "frmOptions.frx":0060
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "Frame1"
Tab(1).ControlCount= 1
Begin VB.CheckBox Check1
Caption = "启动后最小化"
Height = 375
Left = 360
TabIndex = 16
Top = 600
Width = 1575
End
Begin VB.Frame Frame1
Height = 2415
Left = -74760
TabIndex = 7
Top = 480
Width = 5415
Begin VB.ComboBox cobProtocol
Height = 300
ItemData = "frmOptions.frx":007C
Left = 1320
List = "frmOptions.frx":0086
Locked = -1 'True
TabIndex = 15
Top = 1830
Width = 3855
End
Begin VB.TextBox txtLocalPort
Height = 300
Left = 1320
TabIndex = 13
Top = 1340
Width = 3855
End
Begin VB.TextBox txtLocalIP
Height = 300
Left = 1320
Locked = -1 'True
TabIndex = 12
Top = 850
Width = 3855
End
Begin VB.TextBox txtHostName
Height = 300
Left = 1320
Locked = -1 'True
TabIndex = 11
Top = 360
Width = 3855
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Protocol:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 14
Top = 1920
Width = 1080
End
Begin VB.Label labHostName
AutoSize = -1 'True
Caption = "HostName:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 10
Top = 450
Width = 1080
End
Begin VB.Label labLocalIP
AutoSize = -1 'True
Caption = "LocalIP:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 360
TabIndex = 9
Top = 930
Width = 960
End
Begin VB.Label labLocalPort
AutoSize = -1 'True
Caption = "LocalPort:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 120
TabIndex = 8
Top = 1410
Width = 1200
End
End
End
Begin VB.PictureBox picOptions
BorderStyle = 0 'None
Height = 3780
Index = 3
Left = -20000
ScaleHeight = 3780
ScaleWidth = 5685
TabIndex = 2
TabStop = 0 'False
Top = 480
Width = 5685
Begin VB.Frame fraSample4
Caption = "示例 4"
Height = 1785
Left = 2100
TabIndex = 5
Top = 840
Width = 2055
End
End
Begin VB.PictureBox picOptions
BorderStyle = 0 'None
Height = 3780
Index = 2
Left = -20000
ScaleHeight = 3780
ScaleWidth = 5685
TabIndex = 1
TabStop = 0 'False
Top = 480
Width = 5685
Begin VB.Frame fraSample3
Caption = "示例 3"
Height = 1785
Left = 1545
TabIndex = 4
Top = 675
Width = 2055
End
End
Begin VB.PictureBox picOptions
BorderStyle = 0 'None
Height = 3780
Index = 1
Left = -20000
ScaleHeight = 3780
ScaleWidth = 5685
TabIndex = 0
TabStop = 0 'False
Top = 480
Width = 5685
Begin VB.Frame fraSample2
Caption = "示例 2"
Height = 1785
Left = 645
TabIndex = 3
Top = 300
Width = 2055
End
End
End
Attribute VB_Name = "frmOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Check1_Click()
If Check1.Value = 1 Then
Call WritePrivateProfileString("Net Information", "Min", "True", App.Path + "\Setup.ini")
Else
Call WritePrivateProfileString("Net Information", "Min", "False", App.Path + "\Setup.ini")
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
' Call WritePrivateProfileString("Net Information", "HostName", txtHostName.Text, App.Path + "\Setup.ini")
' Call WritePrivateProfileString("Net Information", "LocalIP", txtLocalIP.Text, App.Path + "\Setup.ini")
Call WritePrivateProfileString("Net Information", "LocalPort", txtLocalPort.Text, App.Path + "\Setup.ini")
Call WritePrivateProfileString("Net Information", "Protocol", cobProtocol.Text, App.Path + "\Setup.ini")
MsgBox "Save OK!"
Unload Me
End Sub
Private Sub Form_Load()
'置中窗体
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
txtHostName.Text = GetKey(App.Path + "\Setup.ini", "HostName")
txtLocalIP.Text = GetKey(App.Path + "\Setup.ini", "LocalIP")
txtLocalPort.Text = GetKey(App.Path + "\Setup.ini", "LocalPort")
cobProtocol.Text = GetKey(App.Path + "\Setup.ini", "Protocol")
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?