?? frmmmsz.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmMMSZ
BorderStyle = 1 'Fixed Single
Caption = "密碼設置"
ClientHeight = 5520
ClientLeft = 45
ClientTop = 435
ClientWidth = 7485
Icon = "frmMMSZ.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmMMSZ.frx":29C12
ScaleHeight = 5520
ScaleWidth = 7485
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc adoMMSZ
Height = 615
Left = 5760
Top = 4440
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 1085
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Password=ecc;Persist Security Info=True;User ID=sa;Initial Catalog=PetrolStation System;Data Source=(local)"
OLEDBString = "Provider=SQLOLEDB.1;Password=ecc;Persist Security Info=True;User ID=sa;Initial Catalog=PetrolStation System;Data Source=(local)"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from PS_Users"
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
Begin VB.CommandButton Command2
Caption = "退 出"
BeginProperty Font
Name = "黑體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3720
TabIndex = 9
Top = 4440
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "確 認"
BeginProperty Font
Name = "黑體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 8
Top = 4440
Width = 1935
End
Begin VB.TextBox Text3
Height = 375
IMEMode = 3 'DISABLE
Left = 3120
PasswordChar = "*"
TabIndex = 7
Top = 3240
Width = 2415
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 3120
PasswordChar = "*"
TabIndex = 6
Top = 2400
Width = 2415
End
Begin VB.TextBox Text1
Height = 375
Left = 3120
TabIndex = 5
Top = 1560
Width = 2415
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmMMSZ.frx":368DC
Left = 3120
List = "frmMMSZ.frx":368DE
TabIndex = 4
Top = 840
Width = 2415
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "請 確 認:"
BeginProperty Font
Name = "黑體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 3
Top = 3360
Width = 1335
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "新 密 碼:"
BeginProperty Font
Name = "黑體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 2
Top = 2520
Width = 1335
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "原 密 碼:"
BeginProperty Font
Name = "黑體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 1
Top = 1680
Width = 1335
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用 戶 名:"
BeginProperty Font
Name = "黑體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 0
Top = 840
Width = 1335
End
End
Attribute VB_Name = "frmMMSZ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
adoMMSZ.CommandType = adCmdText
adoMMSZ.RecordSource = " select 用戶 ,密碼 from PS_Users where 用戶='" _
& Trim(Combo1.Text) & "'"
adoMMSZ.Refresh
With adoMMSZ.Recordset
If .RecordCount < 1 Then GoTo myerr
.MoveFirst
DoEvents
strPwd = !密碼
If Trim(Text1.Text) <> strPwd Then '輸入的原密碼錯誤
Dim a
a = MsgBox("對不起,您輸入的密碼錯誤!", vbInformation, "提示")
Text1.SetFocus
GoTo myerr
End If
If Trim(Text2.Text) <> Trim(Text3.Text) Then
If MsgBox("對不起,您兩次輸入的密碼不一致,請重新輸入!", _
vbInformation, "提示") = vbYes Then
End If
Text2.SetFocus
GoTo myerr
End If
End With
adoMMSZ.Recordset.Fields(1) = Trim(Trim(Text3.Text))
adoMMSZ.Recordset.Update
adoMMSZ.Refresh
If MsgBox("密碼修改成功!", vbInformation, "提示") = vbOK Then
frmMain.Hide
frmMain.Show
Unload Me
End If
myerr:
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
adoMMSZ.CommandType = adCmdText
adoMMSZ.RecordSource = "select * from PS_Users"
adoMMSZ.Refresh
With adoMMSZ.Recordset
If .RecordCount > 0 Then
.MoveFirst
Do While Not .EOF
DoEvents
Combo1.AddItem (!用戶)
.MoveNext
Loop
Combo1.ListIndex = 0
End If
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmMain.Enabled = True
frmMain.Show
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -