📄 密码修改1.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form7
Caption = "Form7"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form7"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1680
Top = 2760
Visible = 0 'False
Width = 2055
_ExtentX = 3625
_ExtentY = 582
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=315613;Persist Security Info=True;User ID=sa;Initial Catalog=wt;Data Source=wt"
OLEDBString = "Provider=SQLOLEDB.1;Password=315613;Persist Security Info=True;User ID=sa;Initial Catalog=wt;Data Source=wt"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.Frame Frame1
Caption = "新密码"
Height = 1935
Left = 360
TabIndex = 1
Top = 600
Width = 3855
Begin VB.CommandButton Command1
Caption = "确定"
Height = 255
Left = 1320
TabIndex = 6
Top = 1320
Width = 855
End
Begin VB.TextBox Text3
Height = 270
Left = 1320
TabIndex = 5
Top = 720
Width = 1455
End
Begin VB.TextBox Text2
Height = 270
Left = 1320
TabIndex = 4
Top = 240
Width = 1455
End
Begin VB.Label Label2
Caption = "确定密码"
Height = 255
Left = 240
TabIndex = 3
Top = 720
Width = 735
End
Begin VB.Label Label1
Caption = "新密码"
Height = 255
Left = 240
TabIndex = 2
Top = 240
Width = 735
End
End
Begin VB.TextBox Text1
Height = 375
Left = 360
TabIndex = 0
Top = 2760
Visible = 0 'False
Width = 1215
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.LockType = adLockOptimistic
Adodc1.CursorType = adOpenDynamic
Adodc1.CommandType = adCmdText
On Error GoTo errr
Dim str1 As String
Dim str2 As String
Dim n As Integer
Dim m As Integer
Dim i As Integer
Dim Y As String
Dim z As String
Dim j As Integer
Dim sql As String
j = 0
str1 = Text2.Text
str2 = Text3.Text
n = Len(Trim(str1))
m = Len(Trim(str2))
For i = 1 To n
If Mid(str1, i, 1) = Mid(str2, i, 1) Then
j = j + 1
End If
Next i
If j = n And n = m And n <> 0 And m <> 0 Then
sql = "update 登陆 set 登陆密码='" + Text3.Text + "' where 登陆名='" + Text1.Text + "'"
Adodc1.RecordSource = sql
Adodc1.Refresh
MsgBox "修改完毕!!"
Form7.Hide
MDIForm1.Show
Else
MsgBox "两次密码输入不一致,请重输!"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Exit Sub
errr:
MsgBox "密码错误!!"
End If
End Sub
Private Sub Form_Load()
Text1.Text = Form4.Text1.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -