?? frmyhmmxg.frm
字號:
VERSION 5.00
Begin VB.Form frmyhmmxg
BorderStyle = 1 'Fixed Single
Caption = "用戶密碼修改"
ClientHeight = 3780
ClientLeft = 45
ClientTop = 435
ClientWidth = 4005
Icon = "frmyhmmxg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 3780
ScaleWidth = 4005
Begin VB.CommandButton cmdok
Caption = "確 認"
Default = -1 'True
Height = 375
Left = 480
TabIndex = 5
Top = 3120
Width = 1095
End
Begin VB.CommandButton cmdexit
Cancel = -1 'True
Caption = "退 出"
Height = 375
Left = 2400
TabIndex = 7
Top = 3120
Width = 1095
End
Begin VB.TextBox txt確認密碼
Height = 390
IMEMode = 3 'DISABLE
Left = 1470
PasswordChar = "*"
TabIndex = 3
Top = 2415
Width = 2055
End
Begin VB.TextBox txt密碼2
Height = 390
IMEMode = 3 'DISABLE
Left = 1470
PasswordChar = "*"
TabIndex = 2
Top = 1770
Width = 2055
End
Begin VB.TextBox txt密碼1
Height = 390
IMEMode = 3 'DISABLE
Left = 1470
PasswordChar = "*"
TabIndex = 1
Top = 1140
Width = 2055
End
Begin VB.TextBox txt用戶名
BackColor = &H8000000F&
Enabled = 0 'False
Height = 390
Left = 1470
TabIndex = 0
Text = "admin"
Top = 495
Width = 2055
End
Begin VB.PictureBox Picbg1
Appearance = 0 'Flat
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 1440
Left = 3960
Picture = "frmyhmmxg.frx":19862
ScaleHeight = 1440
ScaleWidth = 1440
TabIndex = 8
Top = 2040
Width = 1440
End
Begin VB.Label 用戶名
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用 戶 名:"
Height = 180
Left = 480
TabIndex = 10
Top = 600
Width = 915
End
Begin VB.Label 原密碼
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "原 密 碼:"
Height = 180
Left = 480
TabIndex = 9
Top = 1245
Width = 915
End
Begin VB.Label Label4
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "確認密碼:"
Height = 180
Left = 465
TabIndex = 6
Top = 2520
Width = 915
End
Begin VB.Label Label3
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密 碼:"
Height = 180
Left = 465
TabIndex = 4
Top = 1875
Width = 915
End
End
Attribute VB_Name = "frmyhmmxg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub cmdok_Click()
Dim rs As New ADODB.Recordset
Dim sql As String
sql = "select 密碼 from yhxxb where 用戶名 = '" & Trim(txt用戶名.Text) & "'"
Set rs = TransactSQL(sql)
If Trim(txt密碼1.Text) = rs.Fields(0) Then
If Trim(txt密碼2.Text) <> Trim(txt確認密碼.Text) Then
MsgBox "密碼與確認密碼不一致!", vbOKOnly + vbExclamation, "錯誤"
txt密碼2.SetFocus
txt密碼2.Text = ""
txt確認密碼.Text = ""
ElseIf Len(Trim(txt密碼2.Text)) < 6 Then
MsgBox "密碼至少有6位", vbOKOnly + vbExclamation, "錯誤"
txt密碼2.SetFocus
txt密碼2.Text = ""
txt確認密碼.Text = ""
Else
rs.Fields(0) = txt密碼2.Text
rs.Update
rs.Close
MsgBox "密碼修改成功!", vbOKOnly + vbExclamation
Unload Me
End If
Else
MsgBox "原密碼不正確!", vbOKOnly + vbExclamation, "錯誤"
txt密碼1.Text = ""
txt密碼1.SetFocus
End If
End Sub
Private Sub Form_Load()
Call fullpic(Me, Picbg1)
Me.Left = (frmmain.ScaleWidth - Me.Width) / 2
Me.Top = (frmmain.ScaleHeight - Me.Height) / 2
txt用戶名.Text = user
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -