📄 菜单修改.frm
字号:
VERSION 5.00
Begin VB.Form frmmodifymenu
BackColor = &H00C0E0FF&
Caption = "菜单修改"
ClientHeight = 6225
ClientLeft = 3135
ClientTop = 2505
ClientWidth = 8400
LinkTopic = "Form4"
ScaleHeight = 6225
ScaleWidth = 8400
Begin VB.Frame Frame2
BackColor = &H00C0E0FF&
Caption = "修改菜单信息"
Height = 975
Left = 960
TabIndex = 17
Top = 4800
Width = 6375
Begin VB.CommandButton Command8
Caption = "修改记录"
Height = 375
Left = 480
TabIndex = 21
Top = 360
Width = 1095
End
Begin VB.CommandButton Command7
Caption = "更新数据"
Enabled = 0 'False
Height = 375
Left = 1860
TabIndex = 20
Top = 360
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "取消修改"
Enabled = 0 'False
Height = 375
Left = 3360
TabIndex = 19
Top = 360
Width = 1095
End
Begin VB.CommandButton Command5
Caption = "删除记录"
Height = 375
Left = 4860
TabIndex = 18
Top = 360
Width = 1095
End
End
Begin VB.TextBox Text4
Enabled = 0 'False
ForeColor = &H00008000&
Height = 375
Left = 5160
TabIndex = 16
Top = 960
Width = 1335
End
Begin VB.Frame Frame1
BackColor = &H00C0E0FF&
Caption = "查看菜单信息"
Height = 975
Left = 960
TabIndex = 11
Top = 3600
Width = 6375
Begin VB.CommandButton Command4
Caption = "--->>"
Height = 375
Left = 4860
TabIndex = 15
Top = 360
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "--->"
Height = 375
Left = 3360
TabIndex = 14
Top = 360
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "<---"
Height = 375
Left = 1860
TabIndex = 13
Top = 360
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "<<---"
Height = 375
Left = 480
TabIndex = 12
Top = 360
Width = 1095
End
End
Begin VB.ComboBox Combo1
ForeColor = &H00008000&
Height = 300
ItemData = "菜单修改.frx":0000
Left = 1680
List = "菜单修改.frx":0019
TabIndex = 10
Text = "类别"
Top = 600
Width = 855
End
Begin VB.TextBox Text5
Enabled = 0 'False
ForeColor = &H00008000&
Height = 1335
Left = 5160
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 8
Top = 1800
Width = 2295
End
Begin VB.TextBox Text3
Enabled = 0 'False
ForeColor = &H00008000&
Height = 375
Left = 1680
TabIndex = 4
Top = 2760
Width = 1335
End
Begin VB.TextBox Text2
Enabled = 0 'False
ForeColor = &H00008000&
Height = 375
Left = 1680
TabIndex = 2
Top = 2040
Width = 1335
End
Begin VB.TextBox Text1
Enabled = 0 'False
ForeColor = &H00008000&
Height = 375
Left = 1680
TabIndex = 0
Top = 1320
Width = 1335
End
Begin VB.Label Label6
BackColor = &H00C0E0FF&
Caption = "类别"
Height = 255
Left = 720
TabIndex = 9
Top = 720
Width = 615
End
Begin VB.Label Label5
BackColor = &H00C0E0FF&
Caption = "备注"
Height = 255
Left = 4200
TabIndex = 7
Top = 2280
Width = 615
End
Begin VB.Label Label4
BackColor = &H00C0E0FF&
Caption = "成本"
Height = 255
Left = 4200
TabIndex = 6
Top = 1080
Width = 615
End
Begin VB.Label Label3
BackColor = &H00C0E0FF&
Caption = "单价"
Height = 255
Left = 720
TabIndex = 5
Top = 2880
Width = 615
End
Begin VB.Label Label2
BackColor = &H00C0E0FF&
Caption = "菜名"
Height = 255
Left = 720
TabIndex = 3
Top = 2040
Width = 615
End
Begin VB.Label Label1
BackColor = &H00C0E0FF&
Caption = "编号"
Height = 255
Left = 720
TabIndex = 1
Top = 1320
Width = 615
End
End
Attribute VB_Name = "frmmodifymenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Dim number As Long
If Combo1.Text = "所有" Then
cptable.MoveNext
If Not cptable.EOF Then
Command3.Enabled = True
Command4.Enabled = True
End If
cptable.MovePrevious
cptable.MovePrevious
If Not cptable.BOF Then
Command2.Enabled = True
Command1.Enabled = True
End If
cptable.MoveNext
number = cptable.Fields(0)
Text1.Text = number
Text2.Text = cptable.Fields(1)
Text3.Text = cptable.Fields(2)
Text4.Text = cptable.Fields(4)
If cptable.Fields(8) <> "" Then
Text5.Text = cptable.Fields(8)
Else
Text5.Text = ""
End If
Else
Command3.Enabled = True '*******************6.5
Command2.Enabled = False '*******************6.5
Command4.Enabled = True '*******************6.5
Command1.Enabled = False '*******************6.5
cptable.MoveFirst
Do While Not cptable.EOF
If cptable.Fields(3) = Combo1.Text Then
number = cptable.Fields(0)
Text1.Text = number
Text2.Text = cptable.Fields(1)
Text3.Text = cptable.Fields(2)
Text4.Text = cptable.Fields(4)
If cptable.Fields(8) <> "" Then
Text5.Text = cptable.Fields(8)
Else
Text5.Text = ""
End If
Exit Sub
End If
cptable.MoveNext
Loop
End If
End Sub
Private Sub Command1_Click()
Dim number As Long
If Combo1.Text = "" Or Combo1.Text = "类别" Then
Exit Sub
End If
Command3.Enabled = True '*******************6.5
Command2.Enabled = False '*******************6.5
Command1.Enabled = False '*******************6.5
Command4.Enabled = True '*******************6.5
If Combo1.Text = "所有" Then
cptable.MoveFirst
number = cptable.Fields(0)
Text1.Text = number
Text2.Text = cptable.Fields(1)
Text3.Text = cptable.Fields(2)
Text4.Text = cptable.Fields(4)
If cptable.Fields(8) <> "" Then
Text5.Text = cptable.Fields(8)
Else
Text5.Text = ""
End If
Else
cptable.MoveFirst
While Not cptable.EOF
If cptable.Fields(3) = Combo1.Text Then
number = cptable.Fields(0)
Text1.Text = number
Text2.Text = cptable.Fields(1)
Text3.Text = cptable.Fields(2)
Text4.Text = cptable.Fields(4)
If cptable.Fields(8) <> "" Then
Text5.Text = cptable.Fields(8)
Else
Text5.Text = ""
End If
Exit Sub
End If
cptable.MoveNext
Wend
End If
End Sub
Public Sub Command2_Click()
Dim number As Long, serial As Long, enable_num As Long
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -