📄 frmmainform.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmMainForm
BorderStyle = 1 'Fixed Single
Caption = "Cheetah Database for Visual Basic - BLOB Example"
ClientHeight = 6405
ClientLeft = 45
ClientTop = 330
ClientWidth = 8235
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6405
ScaleWidth = 8235
StartUpPosition = 2 'CenterScreen
Begin MSComCtl2.Animation Animation1
Height = 705
Left = 195
TabIndex = 16
Top = 2400
Width = 5265
_ExtentX = 9287
_ExtentY = 1244
_Version = 393216
FullWidth = 351
FullHeight = 47
End
Begin VB.Frame Frame1
Height = 1305
Left = 150
TabIndex = 14
Top = 3585
Width = 7905
Begin VB.Label Label1
Caption = $"frmMainForm.frx":0000
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 135
TabIndex = 15
Top = 210
Width = 7635
End
End
Begin VB.PictureBox Picture1
Height = 2625
Left = 5565
ScaleHeight = 2565
ScaleWidth = 2445
TabIndex = 12
Top = 795
Width = 2505
End
Begin VB.CommandButton cmdRecall
Caption = "Recall"
Enabled = 0 'False
Height = 495
Left = 4815
TabIndex = 11
Top = 5670
Width = 1035
End
Begin VB.CommandButton cmdZap
Caption = "Zap"
Enabled = 0 'False
Height = 495
Left = 7065
TabIndex = 10
Top = 5670
Width = 1035
End
Begin VB.CommandButton cmdPack
Caption = "Pack"
Enabled = 0 'False
Height = 495
Left = 5940
TabIndex = 9
Top = 5670
Width = 1035
End
Begin VB.CommandButton cmdMoveLast
Caption = "Last"
Enabled = 0 'False
Height = 495
Left = 7065
TabIndex = 7
Top = 5085
Width = 1035
End
Begin VB.CommandButton cmdMoveNext
Caption = "Next"
Enabled = 0 'False
Height = 495
Left = 5940
TabIndex = 6
Top = 5085
Width = 1035
End
Begin VB.CommandButton cmdMovePrevious
Caption = "Previous "
Enabled = 0 'False
Height = 495
Left = 4815
TabIndex = 5
Top = 5085
Width = 1035
End
Begin VB.CommandButton cmdMoveFirst
Caption = "First"
Enabled = 0 'False
Height = 495
Left = 3690
TabIndex = 4
Top = 5085
Width = 1035
End
Begin VB.CommandButton cmdDelete
Caption = "Delete"
Enabled = 0 'False
Height = 495
Left = 3690
TabIndex = 3
Top = 5670
Width = 1035
End
Begin VB.CommandButton cmdExit
Caption = "E&xit"
Height = 495
Left = 165
TabIndex = 2
Top = 5685
Width = 1035
End
Begin VB.CommandButton cmdCreateFiles
Caption = "&Create Files"
Height = 495
Left = 165
TabIndex = 1
Top = 5085
Width = 1035
End
Begin VB.ListBox lstOutput
BackColor = &H00000000&
BeginProperty Font
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 1425
Left = 165
TabIndex = 0
Top = 480
Width = 5340
End
Begin VB.Label lblAvi
Caption = "AVI:"
Height = 225
Left = 195
TabIndex = 17
Top = 2145
Width = 1215
End
Begin VB.Label lblPicture
Caption = "Picture:"
Height = 345
Left = 5580
TabIndex = 13
Top = 555
Width = 1155
End
Begin VB.Label lblDatabase
BackColor = &H8000000C&
Caption = " lblDatabase"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 330
Left = 165
TabIndex = 8
Top = 150
Width = 7935
End
End
Attribute VB_Name = "frmMainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdDelete_Click()
'mark the current record for deletion
RecNum& = xdbRecordNumber&(cust.dbHandle)
If RecNum& > 0 Then
Call xdbDeleteRecord(cust.dbHandle, RecNum&)
Call ShowCurrentRecord
End If
End Sub
Private Sub cmdRecall_Click()
'mark the current record for deletion
RecNum& = xdbRecordNumber&(cust.dbHandle)
If RecNum& > 0 Then
Call xdbRecallRecord(cust.dbHandle, RecNum&)
Call ShowCurrentRecord
End If
End Sub
Private Sub cmdMoveFirst_Click()
Call xdbMoveFirst(cust.dbHandle, 0)
Call ShowCurrentRecord
End Sub
Private Sub cmdMoveLast_Click()
Call xdbMoveLast(cust.dbHandle, 0)
Call ShowCurrentRecord
End Sub
Private Sub cmdMoveNext_Click()
Call xdbMoveNext(cust.dbHandle, 0)
Call ShowCurrentRecord
End Sub
Private Sub cmdMovePrevious_Click()
Call xdbMovePrev(cust.dbHandle, 0)
Call ShowCurrentRecord
End Sub
Private Sub cmdPack_Click()
result = MsgBox("Remove Deleted records from Database?", vbYesNo + vbQuestion, "Pack")
If result = vbYes Then
Call xdbPack(cust.dbHandle)
End If
lstOutput.Clear
Animation1.Visible = False
Picture1.Visible = False
Call AddMessage("Database has been Packed.")
End Sub
Private Sub cmdZap_Click()
result = MsgBox("Remove ALL records from Database?", vbYesNo + vbQuestion, "Zap")
If result = vbYes Then
Call xdbZap(cust.dbHandle)
lstOutput.Clear
Animation1.Visible = False
Picture1.Visible = False
Call AddMessage("Database has been Zapped.")
End If
End Sub
Private Sub Form_Load()
'change to the applications directory. The Cheetah DLL is in
'this directory so VB can now find it. If you don't change the
'default directory to the application's directory then you
'need to put CHEETAH.DLL in the Windows/System directory.
ChDir App.Path
lblDatabase.Caption = "No Database Active"
End Sub
Private Sub cmdCreateFiles_Click()
'disable this button so we don't re-enter again
cmdCreateFiles.Enabled = False
'if the Cheetah database is already open then close it
'this also closes any associated indexes or memo files.
If cust.dbHandle > 0 Then
Call xdbClose(cust.dbHandle)
cust.dbHandle = 0
End If
Call CreateFiles
'enable the buttons that will manipulate the newly created files
cmdCreateFiles.Enabled = True
cmdMoveFirst.Enabled = True
cmdMovePrevious.Enabled = True
cmdMoveNext.Enabled = True
cmdMoveLast.Enabled = True
cmdDelete.Enabled = True
cmdRecall.Enabled = True
cmdPack.Enabled = True
cmdZap.Enabled = True
End Sub
Private Sub cmdExit_Click()
'any open databases/indexes will be closed in the unload event
Unload Me
End Sub
Private Sub CreateFiles()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -