📄 jdform.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 JDFORM
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 6090
ClientLeft = 7920
ClientTop = 1605
ClientWidth = 8625
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "JDFORM.frx":0000
ScaleHeight = 6090
ScaleWidth = 8625
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton 修改景点
Caption = "修改景点"
Height = 375
Left = 3120
TabIndex = 10
Top = 4680
Width = 975
End
Begin VB.CommandButton 删除景点
Caption = "删除景点"
Height = 375
Left = 2040
TabIndex = 9
Top = 4680
Width = 975
End
Begin VB.CommandButton 添加景点
Caption = "添加景点"
Height = 375
Left = 960
TabIndex = 8
Top = 4680
Width = 975
End
Begin VB.CommandButton 最后一个景点
Caption = "最后一个景点"
Height = 375
Left = 6360
TabIndex = 7
Top = 3240
Width = 1215
End
Begin VB.CommandButton 下一个景点
Caption = "下一个景点"
Height = 375
Left = 6360
TabIndex = 6
Top = 2640
Width = 1215
End
Begin VB.CommandButton 前一个景点
Caption = "前一个景点"
Height = 375
Left = 6360
TabIndex = 5
Top = 2040
Width = 1215
End
Begin VB.CommandButton 第一个景点
Caption = "第一个景点"
Height = 375
Left = 6360
TabIndex = 4
Top = 1440
Width = 1215
End
Begin VB.CommandButton Command9
Caption = "景点总个数"
Height = 375
Left = 5040
TabIndex = 3
Top = 4680
Width = 1215
End
Begin VB.TextBox Text1
Height = 375
Left = 6600
TabIndex = 2
Top = 4680
Width = 855
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "JDFORM.frx":219D9
Height = 2775
Left = 720
TabIndex = 0
Top = 1320
Width = 5295
_ExtentX = 9340
_ExtentY = 4895
_Version = 393216
Enabled = 0 'False
HeadLines = 1
RowHeight = 15
AllowAddNew = -1 'True
AllowDelete = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
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 = 2057
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 = 2057
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 3120
Top = 4200
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 661
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 = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=travalDb"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=travalDb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "旅游景点数据表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "景点管理子系统"
BeginProperty Font
Name = "方正舒体"
Size = 27.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 735
Left = 1680
TabIndex = 1
Top = 360
Width = 4335
End
End
Attribute VB_Name = "JDFORM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub 添加景点_Click()
On Error Resume Next
删除景点.Enabled = Not 删除景点.Enabled
修改景点.Enabled = Not 修改景点.Enabled
If 添加景点.Caption = "添加景点" Then
DataGrid1.Enabled = True
添加景点.Caption = "确认"
Adodc1.Recordset.AddNew
Adodc1.Recordset.Update
Else
添加景点.Caption = "添加景点"
Adodc1.Recordset.MoveLast
DataGrid1.Enabled = False
添加景点.Enabled = True
删除景点.Enabled = True
End If
End Sub
Private Sub 删除景点_Click()
On Error Resume Next
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
Adodc1.Recordset.Update
End Sub
Private Sub 修改景点_Click()
On Error Resume Next
If 修改景点.Caption = "修改景点" Then
DataGrid1.Enabled = True
修改景点.Caption = "确认"
添加景点.Enabled = Not 添加景点.Enabled
删除景点.Enabled = Not 删除景点.Enabled
Adodc1.Recordset.Update
Else
修改景点.Caption = "修改景点"
DataGrid1.Enabled = False
添加景点.Enabled = True
删除景点.Enabled = True
End If
End Sub
Private Sub Command9_Click()
Text1.Text = Adodc1.Recordset.RecordCount
End Sub
Private Sub 第一个景点_Click()
If Adodc1.Recordset.BOF = True Then
MsgBox ("记录已经在第一条!")
Else
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub 前一个景点_Click()
If Adodc1.Recordset.BOF = True Then
MsgBox ("记录已经在第一条!")
Else
Adodc1.Recordset.MovePrevious
End If
End Sub
Private Sub 下一个景点_Click()
If Adodc1.Recordset.EOF = True Then
MsgBox ("记录已经在最后一条!")
Else
Adodc1.Recordset.MoveNext
End If
End Sub
Private Sub 最后一个景点_Click()
If Adodc1.Recordset.EOF = True Then
MsgBox ("记录已经在最后一条!")
Else
Adodc1.Recordset.MoveLast
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -