📄 form0413.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "计费汽油"
ClientHeight = 2850
ClientLeft = 60
ClientTop = 450
ClientWidth = 4140
LinkTopic = "Form1"
ScaleHeight = 2850
ScaleWidth = 4140
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 495
Left = 2640
TabIndex = 5
Text = "0"
Top = 840
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 2760
TabIndex = 4
Top = 2040
Width = 1095
End
Begin VB.Frame Frame1
Caption = "汽油种类"
Height = 1695
Left = 240
TabIndex = 1
Top = 240
Width = 1935
Begin VB.OptionButton Option1
Caption = "97号汽油"
Height = 375
Index = 2
Left = 120
TabIndex = 7
Top = 1080
Width = 1455
End
Begin VB.OptionButton Option1
Caption = "93号汽油"
Height = 375
Index = 1
Left = 120
TabIndex = 6
Top = 720
Width = 1455
End
Begin VB.OptionButton Option1
Caption = "90号汽油"
Height = 375
Index = 0
Left = 120
TabIndex = 2
Top = 360
Width = 1455
End
End
Begin VB.Label Label1
Caption = "数量:(升)"
Height = 375
Left = 2640
TabIndex = 3
Top = 360
Width = 1215
End
Begin VB.Label Label2
Height = 375
Left = 240
TabIndex = 0
Top = 2160
Width = 2055
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Option1_Click(Index As Integer)
'单击选项按钮计算
Dim Prize(2) As Single
Dim Total As Single
Prize(0) = 2.9
Prize(1) = 3.4
Prize(2) = 3.6
Total = Int(Prize(Index) * Text1 * 100) / 100
Label2.Caption = "总价格为:" & Total & "元"
End Sub
Private Sub Command2_Click()
'单击退出按钮
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -