📄 f_xgmm.frm
字号:
VERSION 5.00
Object = "{3A6644DE-3402-11D9-9DE7-C33FAA87690A}#1.0#0"; "WinXPCEngine.ocx"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form F_XGMM
BorderStyle = 3 'Fixed Dialog
Caption = "口令修改"
ClientHeight = 3150
ClientLeft = 45
ClientTop = 435
ClientWidth = 4935
ControlBox = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3150
ScaleWidth = 4935
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 855
Left = 0
ScaleHeight = 855
ScaleWidth = 4935
TabIndex = 8
Top = 0
Width = 4935
Begin VB.Image Image1
Height = 750
Left = 240
Picture = "F_XGMM.frx":0000
Top = 60
Width = 750
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = $"F_XGMM.frx":1DF2
Height = 735
Left = 1320
TabIndex = 9
Top = 120
Width = 3375
End
End
Begin VB.TextBox Text1
Alignment = 2 'Center
BackColor = &H00C0FFC0&
ForeColor = &H00000000&
Height = 270
IMEMode = 3 'DISABLE
Left = 960
MaxLength = 12
PasswordChar = "*"
TabIndex = 0
Top = 1260
Width = 1335
End
Begin VB.TextBox Text3
Alignment = 2 'Center
Height = 270
IMEMode = 3 'DISABLE
Left = 3240
MaxLength = 12
PasswordChar = "*"
TabIndex = 2
Top = 1860
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "取消(&Q)"
Height = 375
Left = 3360
TabIndex = 4
TabStop = 0 'False
Top = 2640
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Height = 375
Left = 1920
TabIndex = 3
Top = 2640
Width = 1335
End
Begin VB.TextBox Text2
Alignment = 2 'Center
Height = 270
IMEMode = 3 'DISABLE
Left = 960
MaxLength = 12
PasswordChar = "*"
TabIndex = 1
Top = 1860
Width = 1335
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2760
Top = 3780
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin WinXPC_Engine.WindowsXPC WindowsXPC1
Left = 2760
Top = 4140
_ExtentX = 6588
_ExtentY = 1085
ColorScheme = 2
Common_Dialog = 0 'False
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "确认"
Height = 180
Left = 2760
TabIndex = 7
Top = 1920
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "新口令"
Height = 180
Left = 360
TabIndex = 6
Top = 1920
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "旧口令"
Height = 180
Left = 360
TabIndex = 5
Top = 1320
Width = 540
End
Begin VB.Line Line3
BorderColor = &H80000001&
X1 = 120
X2 = 4800
Y1 = 2520
Y2 = 2520
End
Begin VB.Line Line4
BorderColor = &H80000005&
X1 = 120
X2 = 4800
Y1 = 2535
Y2 = 2535
End
End
Attribute VB_Name = "F_XGMM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = F_LONG.UserPass Then
On Error GoTo ERR1
Adodc1.ConnectionString = Conn
Adodc1.RecordSource = "SELECT * FROM 操作员字典 WHERE 代码='" & F_LONG.UserCode & "' AND 口令='" & F_LONG.UserPass & "'"
Adodc1.Refresh
If Text2.Text = Text3.Text Then
Adodc1.Recordset.UpdateBatch
Adodc1.Recordset("口令") = Text3.Text
Adodc1.Recordset.Update
Else
MsgBox "新口令确认错误!", vbOKOnly + vbInformation
Text3.SetFocus
Text3.Text = ""
Exit Sub
End If
Else
MsgBox "旧口令错误!", vbOKOnly + vbInformation
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Exit Sub
End If
MsgBox "口令修改成功!", vbOKOnly + vbInformation
Unload Me
Exit Sub
ERR1:
MsgBox "口令不能为空!", vbOKOnly + vbInformation
Text2.SetFocus
Text2.Text = ""
Text3.Text = ""
End Sub
Private Sub Command1_GotFocus()
Text3.BackColor = &HFFFFFF
Text2.BackColor = &HFFFFFF
Text1.BackColor = &HFFFFFF
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
WindowsXPC1.InitSubClassing
End Sub
Private Sub Form_Activate()
F_MAIN.StatusBar1.Panels(2).Text = "【当前活动窗口】" & Me.Caption
End Sub
Private Sub Form_Unload(Cancel As Integer)
F_MAIN.StatusBar1.Panels(2).Text = "目前没有窗口被激活..."
End Sub
Private Sub Text1_GotFocus()
Text3.BackColor = &HFFFFFF
Text2.BackColor = &HFFFFFF
Text1.BackColor = &HC0FFC0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc(vbCr) Then Text2.SetFocus 'Enter键
End Sub
Private Sub Text2_GotFocus()
Text3.BackColor = &HFFFFFF
Text1.BackColor = &HFFFFFF
Text2.BackColor = &HC0FFC0
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc(vbCr) Then Text3.SetFocus 'Enter键
End Sub
Private Sub Text3_GotFocus()
Text1.BackColor = &HFFFFFF
Text2.BackColor = &HFFFFFF
Text3.BackColor = &HC0FFC0
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc(vbCr) Then Command1_Click 'Enter键
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -