?? frmmodipass.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmModiPass
BorderStyle = 1 'Fixed Single
Caption = "修改密碼"
ClientHeight = 2370
ClientLeft = 2610
ClientTop = 2295
ClientWidth = 4365
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2370
ScaleWidth = 4365
Begin VB.CommandButton cmdExit
Caption = "退出"
Height = 312
Left = 2205
TabIndex = 3
Top = 1800
Width = 1335
End
Begin VB.CommandButton cmdOk
Caption = "確認"
Default = -1 'True
Height = 312
Left = 810
TabIndex = 2
Top = 1800
Width = 1335
End
Begin VB.Frame Frame1
Height = 1395
Left = 240
TabIndex = 4
Top = 120
Width = 3855
Begin VB.TextBox txtPassword1
Height = 264
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 0
Top = 360
Width = 1935
End
Begin VB.TextBox txtPassword2
Height = 264
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 1
Top = 840
Width = 1935
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "請輸入新密碼"
Height = 180
Left = 360
TabIndex = 6
Top = 405
Width = 1080
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "請確認新密碼"
Height = 180
Left = 360
TabIndex = 5
Top = 885
Width = 1080
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 315
Left = 3120
Top = 2040
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_ExtentY = 556
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 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Stud97.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Stud97.mdb;Persist Security Info=False"
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
End
Attribute VB_Name = "frmModiPass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'修改密碼窗體frmModiPass
Option Explicit
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdOk_Click() '確認
'檢查各文本框是否為空
If Trim$(txtPassword1.Text) = "" Then
MsgBox "請輸入新密碼!", vbExclamation
txtPassword1.SetFocus
Exit Sub
End If
If Trim$(txtPassword2.Text) = "" Then
MsgBox "請確認新密碼!", vbExclamation
txtPassword2.SetFocus
Exit Sub
End If
'檢查兩次輸入密碼是否相同
If Trim$(txtPassword1.Text) <> Trim$(txtPassword2.Text) Then
MsgBox "確認密碼錯誤,請重新輸入!", vbExclamation
With txtPassword2
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
Exit Sub
End If
With Adodc1 '修改密碼
.RecordSource = "SELECT * FROM 用戶 WHERE 用戶名='" & gstrUser & "'"
.Refresh
.Recordset("密碼") = txtPassword1.Text
.Recordset.Update
End With
MsgBox "密碼修改成功!", vbInformation
End Sub
Private Sub Form_Unload(Cancel As Integer) '窗體卸載時
frmMain.Show
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -