【程式】
1.快餐
Dim total_cost As Integer
Private Sub Command1_Click()
If Check1.Value = vbChecked Then total_cost = total_cost + 70 * Val(Text1.Text)
If Check2.Value = vbChecked Then total_cost = total_cost + 80 * Val(Text2.Text)
If Check3.Value = vbChecked Then total_cost = total_cost + 70 * Val(Text3.Text)
Label1.Caption = "總計=" & Str$(total_cost) & "元"
Command1.Enabled = False
Command2.Enabled = True
End Sub
Private Sub Command2_Click()
total_cost = 0
Check1.Value = vbUnchecked
Check2.Value = vbUnchecked
Check3.Value = vbUnchecked
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Label1.Caption = "總計=" & Str$(total_cost) & "元"
Command1.Enabled = True
Command2.Enabled = False
End Sub
圖形A
Private Sub Form_Activate()
For i = 1 To 5
For j = 1 To i
Print j;
Next j
Print
Next i
Print
End Sub
圖形B
Private Sub Form_Activate()
For i = 5 To 1 Step -1
Print Tab(i);
For j = 5 To i Step -1
Print j;
Next j
Print
Next i
End Sub
Previous in This Category: ◎ 【轉載】男生請注意噢 !!! Next in This Category: 【親愛的 妳只是炮友】


Sealed (Sep 22)









