📄 tshirt.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 7050
ClientLeft = 60
ClientTop = 450
ClientWidth = 9105
LinkTopic = "Form1"
ScaleHeight = 7050
ScaleWidth = 9105
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtRecord
Height = 1095
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 11
Top = 5640
Width = 5775
End
Begin VB.CommandButton cmdRecord
Caption = "&Record"
Height = 615
Left = 3480
TabIndex = 10
ToolTipText = "Click to confirm Transaction"
Top = 4800
Width = 2295
End
Begin VB.CommandButton cmdPurchase
Caption = "&Purchase"
Height = 615
Left = 480
TabIndex = 9
ToolTipText = "Click to confirm Transaction"
Top = 4800
Width = 2055
End
Begin VB.TextBox txtQuantity
Alignment = 2 'Center
BeginProperty Font
Name = "Arial Narrow"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 480
TabIndex = 7
ToolTipText = "Enter quantity of purchase item"
Top = 3600
Width = 1695
End
Begin VB.Frame Frame1
Caption = "T Shirt Size"
BeginProperty Font
Name = "Arial Narrow"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 1455
Left = 240
TabIndex = 3
Top = 1800
Width = 6015
Begin VB.OptionButton optLarge
Caption = "Large"
BeginProperty Font
Name = "Arial Narrow"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3960
TabIndex = 6
Top = 600
Width = 255
End
Begin VB.OptionButton optMedium
Caption = "Medium"
BeginProperty Font
Name = "Arial Narrow"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1920
TabIndex = 5
Top = 600
Width = 255
End
Begin VB.OptionButton optSmall
Caption = "Small"
BeginProperty Font
Name = "Arial Narrow"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 4
Top = 600
Width = 255
End
End
Begin VB.CheckBox chkDiscount
BackColor = &H8000000D&
Caption = "Discount Card Holder"
Height = 255
Left = 360
TabIndex = 2
ToolTipText = "Check if discount card is presented"
Top = 1200
Width = 255
End
Begin VB.ComboBox cboBrand
Height = 315
ItemData = "tshirt.frx":0000
Left = 360
List = "tshirt.frx":0013
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 1
ToolTipText = "Select the brand Name of tshirt"
Top = 480
Width = 4095
End
Begin VB.Label lblAmountDue
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial Narrow"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 3480
TabIndex = 8
Top = 3600
Width = 2175
End
Begin VB.Shape Shape1
DrawMode = 1 'Blackness
Height = 615
Left = 120
Top = 960
Width = 5295
End
Begin VB.Label lblTag1
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "BRAND NAME:"
BeginProperty Font
Name = "Arial Narrow"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 1335
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdPurchase_Click()
If optSmall.Value = True Then
sngPrice = 800
End If
If optMedium.Value = True Then
sngPrice = 900
End If
If optLarge.Value = True Then
sngPrice = 1000
End If
If chkDiscount.Value = 1 Then
sngPrice = sngPrice - (sngPrice * 0.1)
Else
sngPrice = sngPrice
End If
intQuantity = txtQuantity.Text
dblAmountDue = (sngPrice * intQuantity)
lblAmountDue.Caption = dblAmountDue
lblAmountDue.Caption = "P" & Format$(lblAmountDue.Caption, "standard")
End Sub
Private Sub cmdRecord_Click()
'record transaction list and clear setting'
txtRecord.Text = txtRecord.Text & " " & txtQuantity.Text & " " & cboBrand.Text & " " & lblAmountDue.Caption & vbNewLine
cboBrand.ListIndex = -1
optSmall.Value = False
optMedium.Value = False
optLarge.Value = False
chkDiscount = 0
lblAmountDue.Caption = " "
txtQuantity.Text = " "
End Sub
Private Sub Form_Load()
Dim dblAmountDue As Double
Dim sngPrice As Single
Dim intQuantity As Integer
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -