?? frmchangempw.frm
字號:
VERSION 5.00
Begin VB.Form frmChangeMpw
Caption = "管理員密碼修改"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 495
Left = 2160
TabIndex = 6
Top = 2280
Width = 975
End
Begin VB.CommandButton cmdOK
Caption = "確定"
Height = 495
Left = 720
TabIndex = 5
Top = 2280
Width = 975
End
Begin VB.Frame Frame1
Caption = "請輸入"
Height = 1695
Left = 480
TabIndex = 0
Top = 120
Width = 3615
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 4
Top = 1080
Width = 1935
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 2
Top = 360
Width = 1935
End
Begin VB.Label Label2
Caption = "請重新輸入新密碼"
Height = 495
Left = 240
TabIndex = 3
Top = 1080
Width = 855
End
Begin VB.Label Label1
Caption = "新密碼"
Height = 375
Left = 360
TabIndex = 1
Top = 360
Width = 735
End
End
End
Attribute VB_Name = "frmChangeMpw"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'定義成函數,返回是修改證成功
Private Function SaveManageInfo() As Boolean
Dim RS
'先判斷再打開數據庫,避免資源浪費
SaveManageInfo = (Text1 = Text2)
If (Text1 <> Text2) Then
MsgBox "兩次密碼不相同,請重新輸入!", vbOKOnly Or vbInformation, "修改管理員密碼"
Text1.SetFocus 'setfocus是控件的一個方法
Text1 = ""
Text2 = ""
Else
Set RS = CreateObject("ADODB.RecordSet")
StrSQL = "select * from manager where username = '" & LogonUser & "'"
RS.Open StrSQL, ConnStr, 1, 3
RS("password") = Text1
RS.Update
RS.Close
Set RS = Nothing
Unload Me
End If
End Function
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If SaveManageInfo Then Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -