?? setup.frm
字號:
VERSION 5.00
Begin VB.Form form3
BackColor = &H00FF8080&
BorderStyle = 1 'Fixed Single
Caption = " 設(shè)置口令"
ClientHeight = 3615
ClientLeft = 3075
ClientTop = 2070
ClientWidth = 5325
FillColor = &H00FFFFFF&
Icon = "setup.frx":0000
LinkTopic = "Form3"
MaxButton = 0 'False
Picture = "setup.frx":0442
ScaleHeight = 3615
ScaleWidth = 5325
Begin VB.CommandButton Command7
BackColor = &H00FF8080&
DisabledPicture = "setup.frx":40AF8
Height = 375
Left = 4080
Picture = "setup.frx":42DC6
Style = 1 'Graphical
TabIndex = 11
Top = 2880
Width = 1095
End
Begin VB.CommandButton Command6
BackColor = &H00FF8080&
DisabledPicture = "setup.frx":45094
Height = 375
Left = 2760
Picture = "setup.frx":47362
Style = 1 'Graphical
TabIndex = 10
Top = 2880
Width = 1095
End
Begin VB.TextBox Text5
DataField = "password"
DataSource = "Data1"
Height = 270
Left = 2880
TabIndex = 9
Text = "Text5"
Top = 120
Visible = 0 'False
Width = 855
End
Begin VB.TextBox Text4
DataField = "usename"
DataSource = "Data1"
Height = 270
Left = 1920
TabIndex = 8
Text = "Text4"
Top = 120
Visible = 0 'False
Width = 855
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\人事管理系統(tǒng)\data\system.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 285
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "system"
Top = 120
Visible = 0 'False
Width = 1215
End
Begin VB.CommandButton Command5
BackColor = &H00FF8080&
DisabledPicture = "setup.frx":49630
Height = 375
Left = 1440
Picture = "setup.frx":4B8FE
Style = 1 'Graphical
TabIndex = 7
Top = 2880
Width = 1095
End
Begin VB.CommandButton Command4
BackColor = &H00FF8080&
DisabledPicture = "setup.frx":4DBCC
Height = 375
Left = 120
Picture = "setup.frx":4FE9A
Style = 1 'Graphical
TabIndex = 6
Top = 2880
Width = 1095
End
Begin VB.CommandButton Command3
BackColor = &H00FF8080&
DisabledPicture = "setup.frx":52168
Height = 375
Left = 4080
Picture = "setup.frx":54436
Style = 1 'Graphical
TabIndex = 5
ToolTipText = "撤銷密碼"
Top = 2160
Width = 1095
End
Begin VB.CommandButton Command2
BackColor = &H00FF8080&
DisabledPicture = "setup.frx":56704
Height = 375
Left = 4080
Picture = "setup.frx":589D2
Style = 1 'Graphical
TabIndex = 4
ToolTipText = "修改密碼"
Top = 1440
Width = 1095
End
Begin VB.CommandButton Command1
BackColor = &H00FF8080&
DisabledPicture = "setup.frx":5ACA0
Height = 375
Left = 4080
Picture = "setup.frx":5CF6E
Style = 1 'Graphical
TabIndex = 3
ToolTipText = "設(shè)置密碼"
Top = 720
Width = 1095
End
Begin VB.TextBox Text3
ForeColor = &H00FF0000&
Height = 375
IMEMode = 3 'DISABLE
Left = 1320
Locked = -1 'True
PasswordChar = "*"
TabIndex = 2
Top = 2160
Width = 2535
End
Begin VB.TextBox Text2
BackColor = &H00FFFFFF&
ForeColor = &H00FF0000&
Height = 375
IMEMode = 3 'DISABLE
Left = 1320
Locked = -1 'True
PasswordChar = "*"
TabIndex = 1
Top = 1440
Width = 2535
End
Begin VB.TextBox Text1
ForeColor = &H00FF0000&
Height = 375
Left = 1320
Locked = -1 'True
TabIndex = 0
Top = 720
Width = 2535
End
Begin VB.Label Label3
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 375
Left = 1320
TabIndex = 14
Top = 2160
Width = 2535
End
Begin VB.Label Label2
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 375
Left = 1320
TabIndex = 13
Top = 1440
Width = 2535
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 375
Left = 1320
TabIndex = 12
Top = 720
Width = 2535
End
End
Attribute VB_Name = "form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Text1.Visible = True
Text2.Visible = True
Text3.Visible = True
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Data1.Recordset.AddNew
Text1.Locked = False
Text2.Locked = False
Text3.Locked = False
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Text1.Visible = True
Text2.Visible = True
Text3.Visible = True
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command1.Enabled = False
Command3.Enabled = False
Data1.Recordset.MoveFirst
Data1.Recordset.Edit
Text1.Locked = False
Text2.Locked = False
Text3.Locked = False
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Dim r As Integer
r = MsgBox("是否想撤銷密碼", vbQuestion + vbYesNo, "撤銷確認(rèn)")
If r = vbYes Then
save = 1
Data1.Recordset.MoveFirst
Data1.Recordset.Delete
Command3.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Command1.Enabled = False
End If
save = 0
End Sub
Private Sub Command4_Click()
If Text2.Text <> Text3.Text Then
MsgBox "確認(rèn)口令與口令不一致", vbExclamation, "提示信息"
Exit Sub
End If
If Text1.Text = "" And Text2.Text = "" Then
MsgBox "用戶名/口令不能為空", vbExclamation, "提示信息"
Exit Sub
End If
save = 1
Text4.Text = Text1.Text
Text5.Text = Text2.Text
Dim a, b, i As Integer, c As String, d, e, f
d = time
d = Right(d, 1)
d = Int(d)
If d = 0 Then
d = 1
End If
f = d
e = d
a = Text4.Text
c = ""
For i = 1 To Len(a)
b = Mid$(a, i, 1)
b = Chr(Asc(b) Xor d)
c = c + b
d = d + f
f = (-f)
Next i
a = Date
a = Right(a, 1)
a = Chr(a + 45)
e = Chr(e + 40)
Text4.Text = e & c & a
d = time
d = Right(d, 1)
d = Int(d) + 1
If d = 0 Then
d = 1
End If
f = d
e = d
a = Text5.Text
c = ""
For i = 1 To Len(a)
b = Mid$(a, i, 1)
b = Chr(Asc(b) Xor d)
c = c + b
d = d + f
f = (-f)
Next i
a = Date
a = Right(a, 1)
a = Chr(a + 43)
e = Chr(e + 43)
Text5.Text = e & c & a
save = 0
Unload Me
End Sub
Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Private Sub Command6_Click()
If Text2.Text <> Text3.Text Then
MsgBox "確認(rèn)口令與口令不一致", vbExclamation, "提示信息"
Exit Sub
End If
If Text1.Text = "" And Text2.Text = "" Then
MsgBox "用戶名/口令不能為空", vbExclamation, "提示信息"
Exit Sub
End If
save = 1
Text4.Text = Text1.Text
Text5.Text = Text2.Text
Dim a, b, i As Integer, c As String, d, e, f
d = time
d = Right(d, 1)
d = Int(d)
If d = 0 Then
d = 1
End If
e = d
f = d
a = Text4.Text
c = ""
For i = 1 To Len(a)
b = Mid$(a, i, 1)
b = Chr(Asc(b) Xor d)
c = c + b
d = d + f
f = (-f)
Next i
a = Date
a = Right(a, 1)
a = Chr(a + 50)
e = Chr(e + 40)
Text4.Text = e & c & a
d = time
d = Right(d, 1)
d = Int(d) + 1
If d = 0 Then
d = 1
End If
e = d
f = d
a = Text5.Text
c = ""
For i = 1 To Len(a)
b = Mid$(a, i, 1)
b = Chr(Asc(b) Xor d)
c = c + b
d = d + f
f = (-f)
Next i
a = Date
a = Right(a, 1)
a = Chr(a + 72)
e = Chr(e + 43)
Text5.Text = e & c & a
save = 0
Command1.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Text1.Locked = True
Text2.Locked = True
Text1.SetFocus
End Sub
Private Sub Command7_Click()
Unload Me
End Sub
Private Sub Data1_Reposition()
If Data1.Recordset.RecordCount = 0 Then
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command6.Enabled = False
Else
Command1.Enabled = False
End If
End Sub
Private Sub Form_Load()
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Command4.Enabled = False
Command6.Enabled = False
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -