📄 frmoptions.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmOptions
BorderStyle = 3 'Fixed Dialog
Caption = "选项"
ClientHeight = 3165
ClientLeft = 2565
ClientTop = 1500
ClientWidth = 4530
Icon = "frmOptions.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3165
ScaleWidth = 4530
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox picOptions
BackColor = &H00C0FFC0&
FillColor = &H80000012&
Height = 2265
Index = 0
Left = 240
ScaleHeight = 2205
ScaleWidth = 4065
TabIndex = 4
TabStop = 0 'False
Top = 360
Width = 4125
Begin VB.TextBox TxtPass
Height = 375
Index = 2
Left = 1800
MaxLength = 8
TabIndex = 19
Top = 1200
Width = 1455
End
Begin VB.TextBox TxtPass
Height = 375
Index = 1
Left = 1800
MaxLength = 8
TabIndex = 18
Top = 720
Width = 1455
End
Begin VB.TextBox TxtPass
Height = 375
Index = 0
Left = 1800
MaxLength = 8
TabIndex = 17
Top = 240
Width = 1455
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码确认"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 210
Left = 240
TabIndex = 16
Top = 1200
Width = 840
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "输入旧密码"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 210
Left = 240
TabIndex = 15
Top = 360
Width = 1050
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "输入新密码"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 210
Left = 240
TabIndex = 14
Top = 840
Width = 1050
End
End
Begin VB.PictureBox picOptions
BackColor = &H00C0FFC0&
DrawStyle = 2 'Dot
Height = 2265
Index = 1
Left = 240
ScaleHeight = 2205
ScaleWidth = 4065
TabIndex = 5
TabStop = 0 'False
Top = 360
Width = 4125
Begin VB.Frame Frame1
Caption = "出烧牌时间"
Height = 1545
Left = 2040
TabIndex = 10
Top = 240
Width = 1455
Begin VB.OptionButton TimeOpt
Caption = "不限时间"
Height = 255
Index = 2
Left = 120
TabIndex = 13
Top = 1080
Width = 1095
End
Begin VB.OptionButton TimeOpt
Caption = "10秒之内"
Height = 255
Index = 1
Left = 120
TabIndex = 12
Top = 720
Width = 1095
End
Begin VB.OptionButton TimeOpt
Caption = "5秒之内"
Height = 255
Index = 0
Left = 120
TabIndex = 11
Top = 360
Value = -1 'True
Width = 975
End
End
Begin VB.Frame fraSample2
Caption = "够级方式"
Height = 1545
Left = 240
TabIndex = 6
Top = 240
Width = 1455
Begin VB.OptionButton GoujiOpt
Caption = "积分够级"
Height = 375
Index = 2
Left = 240
TabIndex = 9
Top = 1080
Width = 1095
End
Begin VB.OptionButton GoujiOpt
Caption = "憋三够级"
Height = 375
Index = 1
Left = 240
TabIndex = 8
Top = 720
Width = 1095
End
Begin VB.OptionButton GoujiOpt
Caption = "普通够级"
Height = 375
Index = 0
Left = 240
TabIndex = 7
Top = 360
Value = -1 'True
Width = 1095
End
End
End
Begin VB.CommandButton cmdExit
Caption = "退 出"
Height = 375
Left = 2880
TabIndex = 3
Top = 2655
Width = 1095
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取 消"
Height = 375
Left = 1680
TabIndex = 2
Top = 2655
Width = 1095
End
Begin VB.CommandButton cmdOK
Caption = "确 定"
Height = 375
Left = 450
TabIndex = 1
Top = 2655
Width = 1095
End
Begin MSComctlLib.TabStrip tbsOptions
Height = 3075
Left = 120
TabIndex = 0
Top = 0
Width = 4335
_ExtentX = 7646
_ExtentY = 5424
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 2
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "更改密码"
Key = "Group1"
Object.ToolTipText = "为群组 1 设置选项"
ImageVarType = 2
EndProperty
BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "系统设置"
Key = "Group2"
Object.ToolTipText = "为群组 2 设置选项"
ImageVarType = 2
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Attribute VB_Name = "frmOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Nums As Integer '1代表更改密码,2 代表更改系统设置
Private Sub cmdCancel_Click()
Dim i As Integer
For i = 0 To 2
TxtPass(i) = ""
Next
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If Nums = 1 Then
Dim i As Integer
Dim NowUser As String
Dim sSql As String
Dim adoData As New ADODB.Recordset
NowUser = FrmMain.StatusBar1.Panels(2)
sSql = "select 用户名,密码, from passdword where '" & NowUser & "'"
adoData.Open sSql, tsdata.db, adOpenStatic, adLockOptimistic
For i = 0 To 3
If TxtPass(i) = "" Then
MsgBox "请在文本框中输入的密码!", vbOKOnly, "提示"
Exit Sub
End If
Next
If TxtPass(0) <> adoData.Fields(0) Then
MsgBox "你输入的旧密码!", vbOKOnly, "提示"
Exit Sub
End If
If TxtPass(1) <> TxtPass(2) Then
MsgBox "请确认你输入的确认密码是否正确!", vbOKOnly, "提示"
Exit Sub
End If
adoData.Fields(1) = TxtPass(2).Text
adoData.Update
Set adoData = Nothing
End If
If Nums = 2 Then
'更改系统设置程序
End If
End Sub
Private Sub Form_Load()
'置中窗体
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
End Sub
Private Sub tbsOptions_Click()
Dim i As Integer
'显示并使选项的控件可用
'并且隐藏使其他被禁用
For i = 0 To tbsOptions.Tabs.Count - 1
If i = tbsOptions.SelectedItem.Index - 1 Then
Nums = 2 '更改系统设置
picOptions(i).Left = 210
picOptions(i).Enabled = True
Else
Nums = 1 '更改密码
picOptions(i).Left = -20000
picOptions(i).Enabled = False
End If
Next
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -