?? mmchange.frm
字號:
VERSION 5.00
Begin VB.Form mmchange
Caption = "Form1"
ClientHeight = 4185
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 4185
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 495
Left = 1680
TabIndex = 9
Top = 2400
Width = 1695
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2280
TabIndex = 7
Top = 3240
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 375
Left = 600
TabIndex = 6
Top = 3240
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 1680
TabIndex = 5
Top = 1680
Width = 1695
End
Begin VB.Label Label6
Caption = "確認密碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 8
Top = 2400
Width = 1215
End
Begin VB.Label Label5
Caption = "更改密碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 4
Top = 1680
Width = 1215
End
Begin VB.Label Label4
Caption = "Label4"
Height = 495
Left = 1680
TabIndex = 3
Top = 840
Width = 1695
End
Begin VB.Label Label3
Caption = "Label3"
Height = 495
Left = 1680
TabIndex = 2
Top = 240
Width = 1695
End
Begin VB.Label Label2
Caption = "當前密碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 600
TabIndex = 1
Top = 960
Width = 1335
End
Begin VB.Label Label1
Caption = "當前用戶"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 0
Top = 360
Width = 1335
End
End
Attribute VB_Name = "mmchange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
Dim txtSQL As String
Dim MsgText As String
txtSQL = Trim("select password from userlogin where username ='" & Trim(Label3.Caption) & "'")
Set mrc = ExecuteSQL(txtSQL, MsgText)
If Trim(Text1.Text) = "" Then
MsgBox ("密碼不能為空 ")
Else
If Trim(Text1.Text) = Trim(Text2.Text) Then
mrc.Fields(0) = Trim(Text1.Text)
mrc.Update
mrc.Close
MsgBox "更改密碼成功!", vbOKOnly + vbExclamation, "警告"
Me.Hide
Else
MsgBox ("兩次密碼不一樣哦,請再次輸入! ")
End If
End If
End Sub
Private Sub Command2_Click()
Me.Hide
End Sub
Private Sub Form_Load()
Label3.Caption = frmlogin.username
Label4.Caption = frmlogin.password
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -