📄 pass_ch.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form6
BackColor = &H000000C0&
Caption = "Change user Password"
ClientHeight = 3000
ClientLeft = 60
ClientTop = 345
ClientWidth = 6735
ControlBox = 0 'False
LinkTopic = "Form6"
ScaleHeight = 3000
ScaleWidth = 6735
StartUpPosition = 2 'CenterScreen
Begin VB.TextBox T
Height = 375
IMEMode = 3 'DISABLE
Index = 3
Left = 3720
PasswordChar = "*"
TabIndex = 4
Top = 1560
Width = 2535
End
Begin VB.ComboBox Combo1
Height = 315
Left = 3720
TabIndex = 1
Top = 120
Width = 2535
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Height = 495
Left = 4080
Picture = "PASS_CH.frx":0000
Style = 1 'Graphical
TabIndex = 6
Top = 2040
Width = 1455
End
Begin VB.TextBox Text1
DataField = "login"
DataSource = "Adodc1"
Height = 285
Left = 2400
TabIndex = 10
Text = "Text1"
Top = 3000
Width = 150
End
Begin VB.CommandButton Command1
Default = -1 'True
Height = 495
Left = 2280
Picture = "PASS_CH.frx":066A
Style = 1 'Graphical
TabIndex = 5
Top = 2040
Width = 1575
End
Begin VB.TextBox T
Height = 375
IMEMode = 3 'DISABLE
Index = 2
Left = 3720
PasswordChar = "*"
TabIndex = 3
Top = 1080
Width = 2535
End
Begin VB.TextBox T
Height = 375
IMEMode = 3 'DISABLE
Index = 1
Left = 3720
PasswordChar = "*"
TabIndex = 2
Top = 600
Width = 2535
End
Begin VB.TextBox T
Height = 375
Index = 0
Left = 3720
TabIndex = 9
Top = 120
Visible = 0 'False
Width = 2535
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1080
Top = 3000
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=Relience"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "Relience"
OtherAttributes = ""
UserName = "admin"
Password = ""
RecordSource = "select * from login"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "NEW PASSWORD"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 1680
TabIndex = 12
Top = 1080
Width = 1815
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H00C0C0FF&
Caption = "Username and Password is Case-sensitive"
Height = 375
Left = 1560
TabIndex = 11
Top = 2640
Width = 5175
End
Begin VB.Image Image1
Height = 3015
Left = 0
Picture = "PASS_CH.frx":0AAC
Stretch = -1 'True
Top = 0
Width = 1575
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "CONFIRM PASSWORD"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 1680
TabIndex = 8
Top = 1560
Width = 2055
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "OLD PASSWORD"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 1680
TabIndex = 7
Top = 600
Width = 1815
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "USER NAME"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 1680
TabIndex = 0
Top = 120
Width = 1695
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Dim s As String
s = "select * from login where login ='" + Combo1.Text + "'"
Adodc1.RecordSource = s
Adodc1.Refresh
password = Adodc1.Recordset.Fields("pass")
T(1) = ""
T(2) = ""
T(3) = ""
End Sub
Private Sub Command1_Click()
If T(1) <> password Then
MsgBox "The OLD Password is InValid!", vbOKOnly + vbExclamation, "Sorry!"
Exit Sub
End If
If T(2) <> T(3) Then
MsgBox "The NEW Password and CONFIRM Password mismatched!", vbOKOnly + vbExclamation, "Sorry!"
Exit Sub
End If
Dim s As String
s = "select * from login where login ='" + Combo1.Text + "'"
Adodc1.RecordSource = s
Adodc1.Refresh
Adodc1.Recordset.Fields("pass") = T(3).Text
Adodc1.Recordset.Update
MsgBox "Password Has Been Changed Successfully!", vbOKOnly + vbExclamation, "Contrats!"
MAIN.Enabled = True
MAIN.Show
Unload Me
End Sub
Private Sub Command2_Click()
MAIN.Enabled = True
MAIN.Show
Unload Me
End Sub
Private Sub Form_Load()
If is_admin = True Then
Combo1.Clear
Adodc1.Recordset.MoveFirst
While Adodc1.Recordset.EOF = False
Combo1.AddItem Adodc1.Recordset.Fields("login")
Adodc1.Recordset.MoveNext
Wend
Else
Combo1.AddItem username
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -