📄 input.frm
字号:
Y2 = 120
End
Begin VB.Line Line2
Index = 16
X1 = 2880
X2 = 2880
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 15
X1 = 2280
X2 = 2640
Y1 = 480
Y2 = 480
End
Begin VB.Line Line2
Index = 14
X1 = 2640
X2 = 2640
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 13
X1 = 2280
X2 = 2640
Y1 = 120
Y2 = 120
End
Begin VB.Line Line2
Index = 12
X1 = 2280
X2 = 2280
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 11
X1 = 1680
X2 = 2040
Y1 = 480
Y2 = 480
End
Begin VB.Line Line2
Index = 10
X1 = 2040
X2 = 2040
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 9
X1 = 1680
X2 = 2040
Y1 = 120
Y2 = 120
End
Begin VB.Line Line2
Index = 8
X1 = 1680
X2 = 1680
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 7
X1 = 1080
X2 = 1440
Y1 = 480
Y2 = 480
End
Begin VB.Line Line2
Index = 6
X1 = 1440
X2 = 1440
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 5
X1 = 1080
X2 = 1440
Y1 = 120
Y2 = 120
End
Begin VB.Line Line2
Index = 4
X1 = 1080
X2 = 1080
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 3
X1 = 480
X2 = 840
Y1 = 480
Y2 = 480
End
Begin VB.Line Line2
Index = 2
X1 = 840
X2 = 840
Y1 = 120
Y2 = 480
End
Begin VB.Line Line2
Index = 1
X1 = 480
X2 = 840
Y1 = 120
Y2 = 120
End
Begin VB.Line Line2
Index = 0
X1 = 480
X2 = 480
Y1 = 120
Y2 = 480
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
Index = 3
X1 = 0
X2 = 9240
Y1 = 590
Y2 = 590
End
Begin VB.Line Line1
BorderColor = &H00808080&
Index = 2
X1 = 0
X2 = 9240
Y1 = 570
Y2 = 570
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
Index = 1
X1 = 0
X2 = 9240
Y1 = 10
Y2 = 10
End
Begin VB.Line Line1
BorderColor = &H00808080&
Index = 0
X1 = 0
X2 = 9240
Y1 = 0
Y2 = 0
End
Begin VB.Label lblList
AutoSize = -1 'True
Caption = "全部菜单:"
Height = 180
Left = 240
TabIndex = 0
Top = 720
Width = 900
End
Begin VB.Image imgTool
Height = 360
Index = 5
Left = 3480
Picture = "Input.frx":058B
Stretch = -1 'True
ToolTipText = "退出"
Top = 120
Width = 360
End
Begin VB.Image imgTool
Height = 360
Index = 4
Left = 2880
Picture = "Input.frx":09CD
Stretch = -1 'True
ToolTipText = "查找菜单"
Top = 120
Width = 360
End
Begin VB.Image imgTool
Height = 360
Index = 3
Left = 2280
Picture = "Input.frx":0E0F
Stretch = -1 'True
ToolTipText = "删除菜单"
Top = 120
Width = 360
End
Begin VB.Image imgTool
Height = 360
Index = 2
Left = 1680
Picture = "Input.frx":0F11
Stretch = -1 'True
ToolTipText = "保存菜单"
Top = 120
Width = 360
End
Begin VB.Image imgTool
Height = 360
Index = 1
Left = 1080
Picture = "Input.frx":157B
Stretch = -1 'True
ToolTipText = "修改菜单"
Top = 120
Width = 360
End
Begin VB.Image imgTool
Height = 360
Index = 0
Left = 480
Picture = "Input.frx":19BD
Stretch = -1 'True
ToolTipText = "添加菜单"
Top = 120
Width = 360
End
Begin VB.Menu MnuFile
Caption = "文件(&F)"
Begin VB.Menu MnuFileNew
Caption = "添加菜单"
Shortcut = ^N
End
Begin VB.Menu MnuFileModi
Caption = "修改菜单"
Shortcut = ^M
End
Begin VB.Menu MnuFileUndo
Caption = "恢复菜单"
Shortcut = ^U
End
Begin VB.Menu MnuFileSave
Caption = "保存菜单"
Shortcut = ^S
End
Begin VB.Menu MnuFileDelete
Caption = "删除菜单"
Shortcut = ^D
End
Begin VB.Menu MnuFileLine0
Caption = "-"
End
Begin VB.Menu MnuFileFind
Caption = "查找..."
Shortcut = ^F
End
Begin VB.Menu MnuFileLine1
Caption = "-"
End
Begin VB.Menu MnuFileExit
Caption = "退出(&E)"
End
End
Begin VB.Menu MnuShow
Caption = "显示(&S)"
Begin VB.Menu MnuShowSerial
Caption = "按菜系"
Begin VB.Menu MnuList1
Caption = "北京菜系"
Index = 0
End
Begin VB.Menu MnuList1
Caption = "上海菜系"
Index = 1
End
Begin VB.Menu MnuList1
Caption = "四川菜系"
Index = 2
End
Begin VB.Menu MnuList1
Caption = "广东菜系"
Index = 3
End
Begin VB.Menu MnuList1
Caption = "西餐"
Index = 4
End
End
Begin VB.Menu MnuShowMaterial
Caption = "按原料"
Begin VB.Menu MnuList2
Caption = "水产"
Index = 0
End
Begin VB.Menu MnuList2
Caption = "牛羊"
Index = 1
End
Begin VB.Menu MnuList2
Caption = "猪"
Index = 2
End
Begin VB.Menu MnuList2
Caption = "禽类"
Index = 3
End
Begin VB.Menu MnuList2
Caption = "主食面点"
Index = 4
End
Begin VB.Menu MnuList2
Caption = "蔬菜"
Index = 5
End
Begin VB.Menu MnuList2
Caption = "水果"
Index = 6
End
Begin VB.Menu MnuList2
Caption = "汤"
Index = 7
End
Begin VB.Menu MnuList2
Caption = "酒水饮料"
Index = 8
End
End
Begin VB.Menu MnuShowMethod
Caption = "按烹饪方法"
Begin VB.Menu MnuList3
Caption = "炒"
Index = 0
End
Begin VB.Menu MnuList3
Caption = "炸"
Index = 1
End
Begin VB.Menu MnuList3
Caption = "煎"
Index = 2
End
Begin VB.Menu MnuList3
Caption = "烤"
Index = 3
End
Begin VB.Menu MnuList3
Caption = "蒸"
Index = 4
End
Begin VB.Menu MnuList3
Caption = "煮"
Index = 5
End
Begin VB.Menu MnuList3
Caption = "微波炉"
Index = 6
End
Begin VB.Menu MnuList3
Caption = "冷"
Index = 7
End
End
Begin VB.Menu MnuShowLine
Caption = "-"
End
Begin VB.Menu MnuShowWhole
Caption = "全部显示"
End
End
Begin VB.Menu MnuHelp
Caption = "帮助(&H)"
Begin VB.Menu MnuAboutTele
Caption = "修改订餐电话..."
End
Begin VB.Menu MnuAboutLine
Caption = "-"
End
Begin VB.Menu MnuHelpAbout
Caption = "关于(&A)"
End
End
End
Attribute VB_Name = "frmInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim blnOnImage As Boolean
Dim DB As Database
Dim Rec As Recordset
Private Enum State
saved = 0
modify = 1
Add = 2
End Enum
Dim DBState As State
Private Sub File1_Click()
If Len(File1.FileName) > 20 Then
MsgBox "这个文件的名字太长,请把它的名字改为20个字以内。", vbInformation, "输入、编辑菜单原始资料"
File1.Visible = False
Exit Sub
End If
Dim L As Long
L = FileLen(AppDir & "Image\" & File1.FileName)
If L > 350000 Then
MsgBox "图片太大,请把它缩为大约300×300象素,300k左右。", vbInformation, "输入、编辑菜单原始资料"
File1.Visible = False
Exit Sub
End If
lblImage = File1.FileName
File1.Visible = False
Image1.Picture = LoadPicture(File1.Path & "\" & lblImage)
End Sub
Private Sub File1_LostFocus()
File1.Visible = False
End Sub
Private Sub Form_Load()
'File1.Path = AppDir & "Image"
Dim I As Integer
For I = 0 To 23
Line2(I).BorderColor = &H8000000F
Next I
DBState = saved
FrameState (DBState)
Set DB = OpenDatabase(AppDir & "Menu.mdb")
MnuShowWhole_Click
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
blnOnImage = False
Dim I As Integer
For I = 0 To 23
Line2(I).BorderColor = &H8000000F
Next I
End Sub
Private Sub Form_Unload(Cancel As Integer)
Rec.Close
DB.Close
Set Rec = Nothing
Set DB = Nothing
frmMain.MousePointer = 0
frmMain.Show
End Sub
Private Sub Frame1_Click()
File1.Visible = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -