?? frmoption1.frm
字號:
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmOption1
BorderStyle = 3 'Fixed Dialog
Caption = "菜單管理"
ClientHeight = 5175
ClientLeft = 45
ClientTop = 330
ClientWidth = 8100
Icon = "frmOption1.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 5175
ScaleWidth = 8100
ShowInTaskbar = 0 'False
Begin VB.PictureBox pic2
BorderStyle = 0 'None
Height = 4290
Left = 195
ScaleHeight = 4290
ScaleWidth = 7740
TabIndex = 7
Top = 420
Width = 7740
Begin Threed.SSCommand cmdSelectUnit
Height = 270
Left = 7380
TabIndex = 16
Top = 1635
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 476
_StockProps = 78
BevelWidth = 1
RoundedCorners = 0 'False
Picture = "frmOption1.frx":000C
End
Begin VB.TextBox txtCode
Height = 300
Left = 5940
MaxLength = 12
TabIndex = 3
Top = 2265
Width = 1695
End
Begin VB.TextBox txtDW
Height = 300
Left = 5940
MaxLength = 12
TabIndex = 2
Top = 1620
Width = 1710
End
Begin VB.TextBox txtDJ
Height = 300
Left = 5940
MaxLength = 8
TabIndex = 1
Top = 975
Width = 1695
End
Begin VB.TextBox txtPM
Height = 300
Left = 5940
MaxLength = 30
TabIndex = 0
Top = 300
Width = 1695
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Height = 405
Left = 6435
Picture = "frmOption1.frx":02F4
Style = 1 'Graphical
TabIndex = 6
Top = 3690
Width = 1215
End
Begin VB.CommandButton cmdDel
Height = 405
Left = 5070
Picture = "frmOption1.frx":1A60
Style = 1 'Graphical
TabIndex = 5
Top = 3690
Width = 1215
End
Begin VB.CommandButton cmdAdd
Enabled = 0 'False
Height = 405
Left = 3810
Picture = "frmOption1.frx":31CC
Style = 1 'Graphical
TabIndex = 4
Top = 3690
Width = 1215
End
Begin MSFlexGridLib.MSFlexGrid Grid1
Height = 3390
Left = 105
TabIndex = 8
Top = 150
Width = 5520
_ExtentX = 9737
_ExtentY = 5980
_Version = 393216
Cols = 3
BackColorSel = 14737632
ForeColorSel = 32768
BackColorBkg = 12632256
AllowBigSelection= 0 'False
FocusRect = 0
SelectionMode = 1
BorderStyle = 0
Appearance = 0
End
Begin Threed.SSCommand cmdSelectType
Height = 270
Left = 7365
TabIndex = 19
Top = 2985
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 476
_StockProps = 78
BevelWidth = 1
RoundedCorners = 0 'False
Picture = "frmOption1.frx":4938
End
Begin VB.TextBox cmbType
Height = 300
Left = 5940
MaxLength = 20
TabIndex = 18
Top = 2970
Width = 1695
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "==所屬的類別=="
ForeColor = &H00008000&
Height = 180
Index = 1
Left = 5925
TabIndex = 17
Top = 2715
Width = 1665
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "==物品的代碼=="
ForeColor = &H00008000&
Height = 180
Index = 0
Left = 5970
TabIndex = 15
Top = 2025
Width = 1665
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "==物品的單位=="
ForeColor = &H00000000&
Height = 180
Left = 5970
TabIndex = 14
Top = 1380
Width = 1665
End
Begin VB.Line Line4
X1 = 90
X2 = 5655
Y1 = 135
Y2 = 135
End
Begin VB.Line Line3
BorderColor = &H00FFFFFF&
X1 = 90
X2 = 5655
Y1 = 3540
Y2 = 3540
End
Begin VB.Line Line2
BorderColor = &H00FFFFFF&
X1 = 5655
X2 = 5655
Y1 = 150
Y2 = 3555
End
Begin VB.Line Line1
X1 = 90
X2 = 90
Y1 = 150
Y2 = 3525
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "==物品的單價=="
ForeColor = &H000040C0&
Height = 180
Left = 5970
TabIndex = 10
Top = 750
Width = 1665
End
Begin VB.Label Label2
Caption = "==新物品名稱=="
ForeColor = &H00800000&
Height = 255
Left = 5970
TabIndex = 9
Top = 75
Width = 1710
End
End
Begin VB.Line Line5
BorderColor = &H00808080&
Index = 5
X1 = 3195
X2 = 6105
Y1 = 4950
Y2 = 4950
End
Begin VB.Line Line5
BorderColor = &H00808080&
Index = 4
X1 = 3180
X2 = 6090
Y1 = 4875
Y2 = 4875
End
Begin VB.Line Line5
BorderColor = &H00808080&
Index = 3
X1 = 3165
X2 = 6075
Y1 = 4800
Y2 = 4800
End
Begin VB.Line Line5
BorderColor = &H00FFFFFF&
Index = 2
X1 = 3210
X2 = 6120
Y1 = 4965
Y2 = 4965
End
Begin VB.Line Line5
BorderColor = &H00FFFFFF&
Index = 1
X1 = 3195
X2 = 6105
Y1 = 4890
Y2 = 4890
End
Begin VB.Line Line5
BorderColor = &H00FFFFFF&
Index = 0
X1 = 3180
X2 = 6090
Y1 = 4815
Y2 = 4815
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "溫州東化計算機科技有限公司"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 255
Index = 0
Left = 135
TabIndex = 11
Top = 4770
Width = 3315
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "溫州東化計算機科技有限公司"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 255
Index = 2
Left = 135
TabIndex = 13
Top = 4770
Width = 3315
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "溫州東化計算機科技有限公司"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Index = 1
Left = 150
TabIndex = 12
Top = 4785
Width = 3315
End
End
Attribute VB_Name = "frmOption1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmbType_GotFocus()
SetItFocus cmbType
End Sub
Private Sub cmbType_KeyDown(KeyCode As Integer, Shift As Integer)
DirectFocus txtCode, cmdAdd, cmbType, cmbType, KeyCode
End Sub
Private Sub cmbType_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Trim(cmbType) <> "" Then
KeyAscii = 0
If cmdAdd.Enabled = True Then cmdAdd.SetFocus
Else
KeyAscii = 0
cmdSelectType.Value = True
End If
End Sub
Private Sub cmdAdd_Click()
On Error GoTo Err_Add
'查詢Code
If GetCode(Trim(txtCode), "代碼", "EatList") = False Then
MsgBox "對不起,該物品的代碼已經存在,請修改代碼后再添加。", vbOKOnly + vbInformation, "代碼重復"
txtCode = ""
txtCode.SetFocus
Exit Sub
End If
'添加記錄
AddRecord txtPM, "名稱", CCur(txtDJ), "單價", txtDW, "單位", txtCode, "代碼", cmbType.Text, "MenuType", "EatList"
sName = txtPM
'刷新
ConfigGrid
'恢復
txtPM = "": txtDJ = "": txtCode = ""
txtPM.SetFocus
Exit Sub
Err_Add:
MsgBox "添加記錄錯誤! " & vbCrLf & vbCrLf & Err.Description, vbCritical
End Sub
Private Sub cmdAddLine_Click()
' 添加到列表框
listLine.AddItem txtAddLine
txtAddLine.Text = ""
txtAddLine.SetFocus
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdDel_Click()
On Error GoTo Err_del
If Grid1.Text = "" Then
MsgBox "請先選擇一種物品后,再按刪除按鈕。 ", vbExclamation
End If
' 刪除
If MsgBox("真的刪除 [ " & Grid1.Text & " ] 嗎? ", vbYesNo + vbCritical) = vbNo Then
Exit Sub
End If
DelRecord Grid1.Text, "名稱", "EatList"
' 刷新數據
Grid1.RemoveItem Grid1.Row
txtPM.SetFocus
Exit Sub
Err_del:
MsgBox "記錄刪除錯誤! " & vbCrLf & vbCrLf & Err.Description, vbCritical
End Sub
Private Sub cmdDelLine_Click()
On Error GoTo Err_lineDel
If listLine.ListIndex = -1 Then
MsgBox "請先選擇需要刪除的語句,然后按刪除按鈕。 ", vbExclamation
txtAddLine.SetFocus
Exit Sub
End If
' 刪除
listLine.RemoveItem listLine.ListIndex
txtAddLine.SetFocus
Exit Sub
Err_lineDel:
MsgBox "行刪除錯誤! " & vbCrLf & vbCrLf & Err.Description, vbCritical
End Sub
Private Sub cmdOK_Click()
On Error GoTo Err_Save
' 保存選項======================================================
Unload Me
Exit Sub
Err_Save:
MsgBox "保存選項錯誤! " & vbCrLf & vbCrLf & Err.Description, vbCritical
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
If txtCompany = "" Then
txtCompany = "東化科技"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -