📄 add.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form add
BackColor = &H00C0C000&
Caption = "Form1"
ClientHeight = 4245
ClientLeft = 60
ClientTop = 450
ClientWidth = 5715
ForeColor = &H00C0C000&
LinkTopic = "Form1"
Picture = "add.frx":0000
ScaleHeight = 4245
ScaleWidth = 5715
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1440
Top = 3360
Width = 2655
_ExtentX = 4683
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"add.frx":B8ED
OLEDBString = $"add.frx":B986
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "Admin"
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
BackColor = &H00C0C000&
Caption = "添加管理员"
Height = 2775
Left = 1200
TabIndex = 0
Top = 240
Width = 3375
Begin VB.TextBox Text1
DataField = "name"
DataSource = "Adodc1"
Height = 270
Left = 960
TabIndex = 6
Top = 480
Width = 1335
End
Begin VB.TextBox Text2
DataField = "pwd"
DataSource = "Adodc1"
Height = 270
Left = 960
TabIndex = 5
Top = 1080
Width = 1335
End
Begin VB.CommandButton Command1
BackColor = &H00E0E0E0&
Caption = "添加"
Height = 375
Left = 600
Style = 1 'Graphical
TabIndex = 4
Top = 1920
Width = 855
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 1920
TabIndex = 3
Top = 1920
Width = 855
End
Begin VB.CommandButton Command3
Caption = "保存"
Height = 375
Left = 600
TabIndex = 2
Top = 1920
Width = 855
End
Begin VB.CommandButton Command4
Caption = "取消"
Height = 375
Left = 1920
TabIndex = 1
Top = 1920
Width = 855
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00C0C000&
Caption = "用户名"
Height = 180
Left = 360
TabIndex = 8
Top = 480
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00C0C000&
Caption = "密码"
Height = 180
Left = 360
TabIndex = 7
Top = 1080
Width = 360
End
End
End
Attribute VB_Name = "add"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
'Command1.Enabled = False
'Command3.Enabled = True
'Command4.Enabled = True
Command1.Visible = False
Command3.Visible = True
Command4.Visible = True
End Sub
Private Sub Command2_Click()
Unload Me
MDIMain.Show
End Sub
Private Sub Command3_Click()
If Text1 = "" Or Text2 = "" Then
MsgBox "数据填写不完整,请重新填写", vbCritical, "警告"
Text1.SetFocus
Exit Sub
End If
Adodc1.Recordset.Update
'Command3.Enabled = False
'Command4.Enabled = False
'Command1.Enabled = True
Command3.Visible = False
Command4.Visible = False
Command1.Visible = True
End Sub
Private Sub Command4_Click()
Adodc1.Refresh
Command1.Enabled = True
Command3.Enabled = False
Command4.Enabled = False
End Sub
Private Sub Form_Load()
Command3.Visible = False
Command4.Visible = False
Adodc1.Visible = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -