📄 frmuser.frm
字号:
VERSION 5.00
Begin VB.Form frmUser
BorderStyle = 3 'Fixed Dialog
Caption = "639"
ClientHeight = 2700
ClientLeft = 45
ClientTop = 330
ClientWidth = 4755
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2700
ScaleWidth = 4755
ShowInTaskbar = 0 'False
Begin VB.TextBox txtoldpassword
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 1785
PasswordChar = "*"
TabIndex = 4
Top = 300
Width = 2325
End
Begin VB.TextBox ctxtchangepassword
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 1785
PasswordChar = "*"
TabIndex = 3
Top = 1260
Width = 2325
End
Begin VB.TextBox txtchangepassword
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 2
Top = 780
Width = 2325
End
Begin VB.CommandButton comchangeok
BackColor = &H00C0C0C0&
Caption = "642"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
Left = 720
Style = 1 'Graphical
TabIndex = 1
Top = 1980
Width = 1140
End
Begin VB.CommandButton comchangecancel
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "11"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
Left = 2700
Style = 1 'Graphical
TabIndex = 0
Top = 1980
Width = 1140
End
Begin VB.Label Label2
Caption = "643"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 7
Top = 1260
Width = 1320
End
Begin VB.Label lblLabels
Caption = "640"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 2
Left = 480
TabIndex = 6
Top = 780
Width = 1320
End
Begin VB.Label lblLabels
Caption = "641"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Index = 3
Left = 480
TabIndex = 5
Top = 300
Width = 1320
End
End
Attribute VB_Name = "frmUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rs As ADODB.Recordset
Private i As Integer
Private Sub cmdCancel_Click()
Unload Me
End Sub
'Private Sub cmdOK_Click()
' If Trim(Me.txtPassword) = "" Or Trim(username) = "" Or Trim(Me.ctxtpassword) = "" Then
' MsgBox "请填写完整的资料!"
' Exit Sub
' End If
' If Trim(Me.txtPassword) <> Trim(Me.ctxtpassword) Then
' MsgBox "密码与校验密码不同!"
' Exit Sub
' End If
' Set rs = New ADODB.Recordset
' rs.Open "select * from password where name='" & Trim(Me.username.Text) & "'", GetCNClient, adOpenStatic, adLockReadOnly
' If rs.RecordCount <> 0 Then
' MsgBox "用户名已存在,请改用其它名称!"
' rs.Close
' Exit Sub
' End If
' rs.Close
' Set rs = New ADODB.Recordset
' rs.Open "select * from password ", GetCNClient, adOpenDynamic, adLockOptimistic
' rs.AddNew
' rs![Name] = Trim(Me.username)
' rs![Password] = Trim(Me.txtPassword)
' rs.Update
' rs.Close
' Unload Me
'End Sub
Private Sub comchangecancel_Click()
Unload Me
End Sub
Private Sub comchangeok_Click()
If Trim(Me.txtoldpassword) = "" Or Trim(txtchangepassword) = "" Or Trim(ctxtchangepassword) = "" Then
MsgBox "请填写完整的资料!"
Exit Sub
End If
If Trim(Me.txtchangepassword) <> Trim(Me.ctxtchangepassword) Then
MsgBox "密码与校验密码不同!"
Exit Sub
End If
Set rs = New ADODB.Recordset
rs.Open "select * from password where pubOAUser='" & Trim(Me.txtoldpassword.Text) & "'", GetCNClient, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox "密码错误!"
rs.Close
Exit Sub
Else
rs![Password] = Trim(Me.txtchangepassword.Text)
rs.UpdateBatch
MsgBox "成功的修改密码!"
End If
rs.Close
Unload Me
End Sub
Private Sub Form_Load()
Me.Caption = LoadResString(Val(Me.Caption & GLanguageID))
GGetRes GLanguageID, Me
Me.Top = 2050
Me.Left = 2000
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -