■掲示板に戻る■ 全部 1- 最新50 ↓最後

Help

1 在學VB的菜鳥 [ 2005/12/30(Fri) 22:19 ]
在Microsoft Visual Basic 6.0中
怎樣才能重來程式運行?

Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer, s As Integer, area As Integer, x As Integer, z As Integer
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
If a < 0 Or b < 0 Or c < 0 Then MsgBox "長度不能輸入負數", , "錯誤"
End If

在這裡怎樣令到它回到之前的步驟而不做下面的步驟??

If a + b < c Or b + c = a Or a + c = b Then MsgBox "兩邊之和必定大於第三邊", , "錯誤"
End If
s = (a + b + c) / 2
x = s * (s - a) * (s - b) * (s - c)
If x >= 0 Then
area = x ^ (1 / 2)
Text4.Text = area
Else
MsgBox "錯誤輸入數據", , "錯誤"
End If
End Sub



←戻る 全部 次50 ↑先頭
  Name E-Mail URL:(請勿填寫此欄)
  

read.php ver1.4 (2001/10/6)