?? frmpassword.frm
字號:
VERSION 5.00
Begin VB.Form FrmPassword
BorderStyle = 3 'Fixed Dialog
Caption = "密碼設置"
ClientHeight = 3360
ClientLeft = 45
ClientTop = 330
ClientWidth = 4890
Icon = "FrmPassword.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3360
ScaleWidth = 4890
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 375
IMEMode = 3 'DISABLE
Index = 2
Left = 2280
PasswordChar = "*"
TabIndex = 7
Top = 1800
Width = 1815
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 375
IMEMode = 3 'DISABLE
Index = 1
Left = 2280
PasswordChar = "*"
TabIndex = 6
Top = 1080
Width = 1815
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 375
IMEMode = 3 'DISABLE
Index = 0
Left = 2280
PasswordChar = "*"
TabIndex = 5
Top = 360
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 2880
TabIndex = 4
Top = 2520
Width = 975
End
Begin VB.CommandButton Command1
Caption = "確認"
Height = 495
Left = 1080
TabIndex = 3
Top = 2520
Width = 975
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "確認密碼:"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 600
TabIndex = 2
Top = 1920
Width = 1290
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "新密碼:"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 945
TabIndex = 1
Top = 1200
Width = 1005
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "原密碼"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 960
TabIndex = 0
Top = 480
Width = 855
End
End
Attribute VB_Name = "FrmPassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Setup_DB As Database
Dim Setup_RS As Recordset
Private Sub Command1_Click()
Set Setup_DB = OpenDatabase(App.Path + "\setup.mdb")
Set Setup_RS = Setup_DB.OpenRecordset("參數設定")
If Text1(0).Text = Setup_RS.Fields(13) Or Setup_RS.Fields(13) = "-" Then
If Text1(1).Text = Text1(2).Text Then
Setup_RS.Edit
If Text1(1).Text = "" Then
Setup_RS.Fields(13) = "-"
Else
Setup_RS.Fields(13) = Text1(1).Text
End If
Setup_RS.Update
MsgBox "密碼改功!", 64, "提示"
Unload Me
FrmMain.Show
Else
MsgBox "兩次輸入密碼不一樣", 16, "出錯提示"
End If
Else
MsgBox "原密碼不正確", 16, "出錯提示"
End If
For x = 0 To 2
Text1(x).Text = ""
Next x
End Sub
Private Sub Command2_Click()
Unload Me
FrmMain.Show
End Sub
Private Sub Form_Load()
Set Setup_DB = OpenDatabase(App.Path + "\setup.mdb")
Set Setup_RS = Setup_DB.OpenRecordset("參數設定")
If Setup_RS.Fields(13) = "-" Then Text1(0).Enabled = False
Setup_DB.Close
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
FrmMain.Show
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -