📄 dialognewmen.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Dialog
BorderStyle = 3 'Fixed Dialog
Caption = "添加新用户"
ClientHeight = 3276
ClientLeft = 2760
ClientTop = 3756
ClientWidth = 3612
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3276
ScaleWidth = 3612
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 375
Left = 2040
TabIndex = 8
Top = 2520
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确 认"
Height = 375
Left = 360
TabIndex = 7
Top = 2520
Width = 1215
End
Begin VB.TextBox Text6
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 6
Top = 1920
Width = 1815
End
Begin VB.TextBox Text5
BackColor = &H80000000&
BorderStyle = 0 'None
Height = 375
Left = 360
TabIndex = 5
Text = "确认密码"
Top = 1920
Width = 855
End
Begin VB.TextBox Text4
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 4
Top = 1320
Width = 1815
End
Begin VB.TextBox Text3
BackColor = &H80000000&
BorderStyle = 0 'None
Height = 375
Left = 360
TabIndex = 3
Text = "密码"
Top = 1320
Width = 615
End
Begin VB.TextBox Text2
Height = 375
Left = 1440
TabIndex = 2
Top = 720
Width = 1815
End
Begin VB.TextBox Text1
BackColor = &H80000000&
BorderStyle = 0 'None
Height = 375
Left = 360
TabIndex = 1
Text = "用户名"
Top = 720
Width = 735
End
Begin MSComctlLib.TabStrip TabStrip1
Height = 3255
Left = 0
TabIndex = 0
Top = 0
Width = 3615
_ExtentX = 6371
_ExtentY = 5736
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 1
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "新用户"
ImageVarType = 2
EndProperty
EndProperty
End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CancelButton_Click()
End Sub
Private Sub OKButton_Click()
End Sub
Private Sub Command1_Click()
If Text2.Text <> "" And Text4.Text <> "" And Text6.Text <> "" Then
If Text4.Text = Text6.Text Then
dialogs.Adodc1.Recordset("用户") = Text2.Text
dialogs.Adodc1.Recordset("密码") = Text6.Text
dialogs.Adodc1.Recordset.Update
dialogs.Show
dialogs.SetFocus
Dialog.Hide
Set Dialog = Nothing
Else
MsgBox "口令输入有误,确认后请重输", 64, "口令错误"
Text6.SetFocus
Text6.SelStart = 0
Text6.SelLength = Len(Text6.Text)
End If
End If
End Sub
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "确认新用户输入"
End Sub
Private Sub Command2_Click()
'dialogs.Adodc1.Recordset.CancelUpdate
dialogs.Show
dialogs.Adodc1.Recordset.Delete
Dialog.Hide
Set Dialog = Nothing
End Sub
Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "取消用户输入"
End Sub
Private Sub Form_Load()
dialogs.Adodc1.Recordset.AddNew
dialogs.Adodc1.Recordset("用户") = "supperman"
End Sub
Private Sub Form_Unload(Cancel As Integer)
dialogs.Adodc1.Refresh
End Sub
Private Sub TabStrip1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = ""
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "输入新用户名"
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "输入新用户密码"
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.Value = True
End If
End Sub
Private Sub Text6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "确认新用户密码"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -