📄 frmoption.frm
字号:
VERSION 5.00
Object = "{4932CEF1-2CAA-11D2-A165-0060081C43D9}#2.0#0"; "Actbar2.ocx"
Object = "{E3AE1957-12AC-4DB7-8CE4-EB281F9E0359}#1.0#0"; "XPButton.ocx"
Object = "{FDAC2480-F4ED-4632-AA78-DCA210A74E49}#6.0#0"; "SPR32X60.ocx"
Begin VB.Form frmoption
AutoRedraw = -1 'True
Caption = "Form2"
ClientHeight = 5925
ClientLeft = 1680
ClientTop = 2655
ClientWidth = 7860
LinkTopic = "Form2"
MDIChild = -1 'True
ScaleHeight = 5925
ScaleWidth = 7860
Begin ActiveBar2LibraryCtl.ActiveBar2 Abar
Align = 1 'Align Top
Height = 5925
Left = 0
TabIndex = 0
Top = 0
Width = 7860
_LayoutVersion = 1
_ExtentX = 13864
_ExtentY = 10451
_DataPath = ""
Bands = "frmOption.frx":0000
Begin VB.PictureBox Pic
Height = 6255
Left = 30
ScaleHeight = 6195
ScaleWidth = 8805
TabIndex = 1
Top = 210
Width = 8865
Begin VB.Data siteData
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 420
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 6540
Width = 1140
End
Begin FPSpread.vaSpread fpsp
Bindings = "frmOption.frx":026A
Height = 5385
Left = 180
TabIndex = 10
Top = 240
Width = 4005
_Version = 393216
_ExtentX = 7064
_ExtentY = 9499
_StockProps = 64
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
SpreadDesigner = "frmOption.frx":0281
End
Begin VB.Frame Fredit
Caption = "消费品信息"
Enabled = 0 'False
Height = 5595
Left = 4320
TabIndex = 2
Top = 30
Width = 3375
Begin VB.ComboBox Ctype
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 300
Left = 1230
Style = 2 'Dropdown List
TabIndex = 15
Top = 2910
Width = 1935
End
Begin VB.ComboBox Cunit
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 300
Left = 1230
Style = 2 'Dropdown List
TabIndex = 14
Top = 2358
Width = 1155
End
Begin VB.TextBox Tcode
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
ForeColor = &H00000000&
Height = 345
Left = 1230
TabIndex = 13
Top = 570
Width = 1245
End
Begin VB.TextBox Tname
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
ForeColor = &H00000000&
Height = 345
Left = 1200
TabIndex = 4
Top = 1166
Width = 1995
End
Begin VB.TextBox Tprice
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
ForeColor = &H00000000&
Height = 345
Left = 1200
TabIndex = 3
Top = 1762
Width = 1215
End
Begin XPButton.Button cok
Height = 345
Left = 600
TabIndex = 5
Top = 4680
Width = 945
_ExtentX = 1667
_ExtentY = 609
caption = "确认"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPButton.Button ccancle
Height = 345
Left = 1890
TabIndex = 6
Top = 4680
Width = 945
_ExtentX = 1667
_ExtentY = 609
caption = "放弃"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "计量单位:"
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 12
Top = 2430
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "类别:"
ForeColor = &H00000000&
Height = 180
Index = 1
Left = 570
TabIndex = 11
Top = 3000
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "代码:"
Height = 180
Index = 7
Left = 570
TabIndex = 9
Top = 660
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "名称:"
Height = 180
Index = 1
Left = 570
TabIndex = 8
Top = 1275
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "单价:"
Height = 180
Index = 3
Left = 570
TabIndex = 7
Top = 1860
Width = 540
End
End
End
End
End
Attribute VB_Name = "frmoption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset
Dim dbs As Database
Private Sub ABar_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)
'On Error GoTo er
Select Case Tool.Name
Case "m_add"
CurrOp = "add"
Fredit.Enabled = True
fpsp.Enabled = False
Tname.Enabled = True
Abar.Tools("m_add").Enabled = False
Abar.Tools("m_modify").Enabled = False
Abar.Tools("m_del").Enabled = False
Abar.Tools("m_print").Enabled = False
Tname.SetFocus
Case "m_del"
If MsgBox("是否删除消费品:" & Tname.Text & "?", vbQuestion + vbYesNo, "消费品删除") = vbYes Then
dbs.Execute "delete from EatList where 代码 = '" & Tcode.Text & "'"
rst.Requery
InitGrid
End If
Case "m_modify"
CurrOp = "modify"
Fredit.Enabled = True
fpsp.Enabled = False
Abar.Tools("m_add").Enabled = False
Abar.Tools("m_modify").Enabled = False
Abar.Tools("m_del").Enabled = False
Abar.Tools("m_print").Enabled = False
Tname.SetFocus
Case "m_print"
InitGrid
tmp = "消费品名称" & Space(10) & "容纳人数" & Space(10) & "台位费"
Printer.Print tmp
Printer.Print "========================================="
Do While Not rst.EOF
tmp = rst!siteName & Space(10) & rst!PersonerN & Space(10) & rst!SitePay
Printer.Print tmp
rst.MoveNext
Loop
Case "m_exit"
Unload Me
End Select
Exit Sub
er:
ErrorHandle ""
End Sub
Private Sub Form_Load()
Dim t As ActiveBar2LibraryCtl.Tool
Dim b As ActiveBar2LibraryCtl.Band
Dim keys(0) As New ShortCut
GetFormSet Me, frmMain
Abar.ClientAreaControl = Pic
Me.Icon = LoadResPicture(227, vbResIcon)
Me.Caption = "消费品管理"
Set Tool = Abar.Tools.Add(0, "Separator")
With Tool
.Caption = ""
.Category = "Format"
.ControlType = ddTTSeparator
End With
Set b = Abar.Bands.Add("toolsMain")
b.Type = ddBTNormal
b.Caption = "工具条"
b.DisplayMoreToolsButton = False
b.DockingArea = ddDATop
b.MouseTracking = ddTSBevel
b.GrabHandleStyle = ddGSNormal
Set t = Abar.Tools.Add(GetUniqueToolID(), "m_add")
With t
.Caption = "增加"
.SetPicture ddITNormal, LoadResPicture(101, vbResBitmap)
.ControlType = ddTTButton
keys(0) = "Control+A"
.ShortCuts = keys
.ToolTipText = "增加消费品"
.CaptionPosition = ddCPBelow
.Style = ddSIconText
End With
Set t = Abar.Tools.Add(GetUniqueToolID(), "m_modify")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -