January 11, 2008

【程式】

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

 

 

0推薦此文章
Today's Visitors: 0 Total Visitors: 2
Personal Category: 【文章】::; ** Topic: technology
Previous in This Category: ◎ 【轉載】男生請注意噢 !!!   Next in This Category: 【親愛的 妳只是炮友】
[Trackback URL]

Post A Comment









Yes No



Please input the magic number:

( Prevent the annoy garbage messages )
( What if you cannot see the numbers? )
Please input the magic number

誰來收藏
Loading ...
unlog_NVPO 0