📄 form2.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form2
Caption = "Form2"
ClientHeight = 5310
ClientLeft = 60
ClientTop = 450
ClientWidth = 11130
LinkTopic = "Form2"
Picture = "Form2.frx":0000
ScaleHeight = 5310
ScaleWidth = 11130
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "返回"
Height = 375
Left = 9360
TabIndex = 14
Top = 4920
Width = 1335
End
Begin VB.Timer Timer2
Interval = 600
Left = 840
Top = 360
End
Begin VB.Timer Timer1
Interval = 600
Left = 240
Top = 360
End
Begin VB.TextBox Text2
BackColor = &H00C0C0FF&
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 615
Left = 2640
TabIndex = 13
Top = 240
Width = 6375
End
Begin VB.CommandButton Command2
Caption = "确定"
Height = 495
Left = 2040
TabIndex = 12
Top = 4560
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 495
Left = 480
TabIndex = 11
Top = 4560
Width = 1335
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "Form2.frx":28FD9
Height = 3615
Left = 3480
TabIndex = 9
Top = 1200
Width = 7215
_ExtentX = 12726
_ExtentY = 6376
_Version = 393216
BackColor = 16777152
HeadLines = 1
RowHeight = 16
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "用户信息表"
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.ComboBox Combo1
DataField = "会员标志"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "Form2.frx":28FEE
Left = 1680
List = "Form2.frx":28FF8
TabIndex = 8
Top = 3840
Width = 855
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 5520
Top = 4800
Visible = 0 'False
Width = 2175
_ExtentX = 3836
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=disk"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "disk"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 用户信息表"
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.TextBox Text1
DataField = "押金"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 3
Left = 1320
TabIndex = 7
Top = 3240
Width = 2055
End
Begin VB.TextBox Text1
DataField = "联系电话"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 2
Left = 1320
TabIndex = 6
Top = 2640
Width = 2055
End
Begin VB.TextBox Text1
DataField = "姓名"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 1
Left = 1320
TabIndex = 5
Top = 2040
Width = 2055
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
DataField = "编号"
DataSource = "Adodc1"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 1560
TabIndex = 10
Top = 1440
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "押金:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Index = 4
Left = 600
TabIndex = 4
Top = 3360
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "联系电话:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Index = 3
Left = 120
TabIndex = 3
Top = 2760
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "姓名:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Index = 2
Left = 600
TabIndex = 2
Top = 2160
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "会员标志:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Index = 1
Left = 120
TabIndex = 1
Top = 3840
Width = 1455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "编号:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Index = 0
Left = 600
TabIndex = 0
Top = 1440
Width = 1455
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Conn As ADODB.Connection
Private RS As ADODB.Recordset
Private Sub Command1_Click()
Dim str As String
Set RS.ActiveConnection = Conn
RS.CursorType = adOpenForwardOnly
Adodc1.Recordset.AddNew
str = "select * from 用户信息表"
RS.Open str
RS.MoveLast
Label2.Caption = RS.Fields("编号") + 1
RS.Close
Command1.Enabled = False
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.AddNew
Adodc1.Refresh
Command1.Enabled = True
End Sub
Private Sub Command3_Click()
Form1.Show
Unload Me
End Sub
Private Sub Form_Load()
Set Conn = New ADODB.Connection
Set RS = New Recordset
Set comm = New ADODB.Command
Conn.CursorLocation = adUseClient
Conn.Open "dsn=disk", "", ""
End Sub
Private Sub Timer1_Timer()
Text2.Text = " 用户信息输入"
End Sub
Private Sub Timer2_Timer()
Text2.Text = " 用户信息输入 "
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -