📄 frmuserxg.frm
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "ACTSKN43.OCX"
Begin VB.Form frmuserxg
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 3825
ClientLeft = 2475
ClientTop = 2820
ClientWidth = 5700
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3825
ScaleWidth = 5700
Begin VB.TextBox txtname1
Height = 375
Left = 1440
TabIndex = 8
Text = "Text1"
Top = 4560
Width = 1935
End
Begin VB.TextBox txtmm1
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 2520
PasswordChar = "*"
TabIndex = 6
Top = 1920
Width = 2775
End
Begin VB.CommandButton cmdqd
Caption = "确 定"
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 3
Top = 2880
Width = 1215
End
Begin VB.CommandButton cmgqk
Caption = "清 空"
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3600
TabIndex = 2
Top = 2880
Width = 1215
End
Begin VB.TextBox txtmm
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 2520
PasswordChar = "*"
TabIndex = 1
Top = 1080
Width = 2775
End
Begin VB.TextBox txtname
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 0
Top = 240
Width = 2775
End
Begin ACTIVESKINLibCtl.Skin Skin1
Left = 360
OleObjectBlob = "frmuserxg.frx":0000
Top = 2760
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel2
Height = 345
Left = 360
OleObjectBlob = "frmuserxg.frx":0234
TabIndex = 4
Top = 360
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel3
Height = 345
Left = 360
OleObjectBlob = "frmuserxg.frx":0293
TabIndex = 5
Top = 1200
Width = 1695
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1
Height = 345
Left = 360
OleObjectBlob = "frmuserxg.frx":02F6
TabIndex = 7
Top = 2040
Width = 1695
End
End
Attribute VB_Name = "frmuserxg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As ADODB.Recordset
Dim sql As String
Private Sub cmdqd_Click()
On Error Resume Next
Select Case frmuserxg.Caption
Case "添加管理员"
If txtname.Text = "" Then
MsgBox "请输入管理员名称!"
Exit Sub
End If
If txtmm.Text = "" Then
MsgBox "请输入管理员密码!"
Exit Sub
End If
If txtmm1.Text = "" Then
MsgBox "请输入管理员密码!"
Exit Sub
End If
If txtmm.Text <> txtmm1.Text Then
MsgBox "2次输入的密码不一样,请重新输入!"
txtmm.Text = ""
txtmm1.Text = ""
End If
rs.AddNew
rs.Fields("管理员").Value = txtname.Text
rs.Fields("密码").Value = txtmm.Text
rs.Update
MsgBox "添加成功"
Case "修改管理员"
sql = "select * from gly where 管理员='" & txtname1.Text & "'"
Set rs = search(sql)
If txtname.Text = "" Then
MsgBox "请输入管理员名称!"
Exit Sub
End If
If txtmm.Text = "" Then
MsgBox "请输入管理员密码!"
Exit Sub
End If
If txtmm1.Text = "" Then
MsgBox "请输入管理员密码!"
Exit Sub
End If
If txtmm.Text <> txtmm1.Text Then
MsgBox "2次输入的密码不一样,请重新输入!"
txtmm.Text = ""
txtmm1.Text = ""
End If
rs.Fields("管理员").Value = txtname.Text
rs.Fields("密码").Value = txtmm.Text
rs.Update
MsgBox "修改成功"
End Select
FrmUsers.rs.Requery
End Sub
Private Sub cmgqk_Click()
On Error Resume Next
txtname.Text = ""
txtmm.Text = ""
txtmm1.Text = ""
txtname.SetFocus
End Sub
Private Sub Form_Load()
Call showskin(Skin1, hwnd)
Set rs = search("select * from gly")
' If txtname1.Text = "admin" Then
' txtname.Text = "admin"
' txtname.Enabled = False
' Else
' MsgBox "无法修改此用户名" & Chr(13) & "可以修改它的密码!"
' End If
' If txtname1.Text = "youke" Then
' txtname.Text = "youke"
' txtname.Enabled = False
' txtmm.Text = "1234"
' txtmm.Enabled = False
' txtmm1.Text = "1234"
' txtmm1.Enabled = False
' Else
' MsgBox "无法修改此用户!"
' End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -