?? frm_xgmm.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_xgmm
BorderStyle = 3 'Fixed Dialog
Caption = "修改密碼"
ClientHeight = 1965
ClientLeft = 45
ClientTop = 330
ClientWidth = 4125
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1965
ScaleWidth = 4125
ShowInTaskbar = 0 'False
Begin VB.TextBox Text5
Height = 375
Left = 600
TabIndex = 10
Text = "111"
Top = 2040
Width = 975
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 2640
Width = 1935
_ExtentX = 3413
_ExtentY = 661
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=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_xxwhb"
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.TextBox Text4
Height = 375
Left = 2400
TabIndex = 9
Text = "Text4"
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3120
TabIndex = 2
Top = 1560
Width = 975
End
Begin VB.Frame Frame1
Height = 1455
Left = 10
TabIndex = 0
Top = 0
Width = 4095
Begin VB.TextBox Text3
Height = 300
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 8
Top = 960
Width = 2535
End
Begin VB.TextBox Text2
Height = 300
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 7
Top = 600
Width = 2535
End
Begin VB.TextBox Text1
Height = 300
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 6
Top = 240
Width = 2535
End
Begin VB.Label Label3
Caption = "請確認新密碼"
Height = 255
Left = 120
TabIndex = 5
Top = 1050
Width = 1095
End
Begin VB.Label Label2
Caption = "請輸入新密碼"
Height = 375
Left = 120
TabIndex = 4
Top = 690
Width = 1095
End
Begin VB.Label Label1
Caption = "請輸入舊密碼"
Height = 375
Left = 120
TabIndex = 3
Top = 330
Width = 1215
End
End
Begin VB.CommandButton Command1
Caption = "確認"
Height = 375
Left = 2040
TabIndex = 1
Top = 1560
Width = 975
End
End
Attribute VB_Name = "frm_xgmm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Public adoCon As New ADODB.Connection
'Public adoRs As New ADODB.Recordset
Private Sub Command1_Click()
Call main
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "輸入不能為空!!", 32, "人口信息管理系統"
Else
Adodc1.RecordSource = "select * from Table_xxwhb where 密碼 ='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text4.Text = Adodc1.Recordset.Fields("用戶名")
If Text2.Text <> Text3.Text Then
MsgBox "兩次輸入的密碼不一致,請您確認后重新輸入", 32, "人口信息管理系統"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
Set adoRs = adoCon.Execute("UPDATE Table_xxwhb SET 密碼= '" + Text3.Text + "' where 用戶名='" + Text4.Text + "'")
Adodc1.Refresh
MsgBox "密碼修改成功,請您記住新密碼", , "人口信息管理系統"
frm_xgmm.Hide
End If
Else
MsgBox "沒有此用戶的信息,請您確認后重新輸入", 32, "人口信息管理系統"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End If
End If
adoCon.Close
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
Call main
If KeyCode = 13 Then
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "輸入不能為空!!", 32, "人口信息管理系統"
Else
Adodc1.RecordSource = "select * from Table_xxwhb where 密碼 ='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text4.Text = Adodc1.Recordset.Fields("用戶名")
If Text2.Text <> Text3.Text Then
MsgBox "兩次輸入的密碼不一致,請您確認后重新輸入", 32, "人口信息管理系統"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
Set adoRs = adoCon.Execute("UPDATE Table_xxwhb SET 密碼= '" + Text3.Text + "' where 用戶名='" + Text4.Text + "'")
' Adodc1.Recordset.Delete
' Set adoRs = adoCon.Execute("insert into Table_YHDL values(" & Text5 & ",'" & Text4 & "','" & Text2 & "')")
Adodc1.Refresh
MsgBox "密碼修改成功,請您記住新密碼", , "人口信息管理系統"
frm_xgmm.Hide
End If
Else
MsgBox "沒有此用戶的信息,請您確認后重新輸入", 32, "人口信息管理系統"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End If
End If
Else
End If
adoCon.Close
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -