。
表單設計 |
---|
![]() |
執行畫面 |
![]() |
Form1 : 調整表單視窗的大小,使Width和Height合乎適當大小。 Label1 : Caption "圓半徑=" Label2 : Caption "圓周長=" Label3 : Caption "圓面積=" Text1: Alignment "2-置中對齊",Text "" Text2: Alignment "2-置中對齊",Text "" Text3: Alignment "2-置中對齊",Text "" |
Private Sub Command1_Click() End End Sub Private Sub Text1_Change() PI = 3.1416 R = Val(Text1.Text) C = 2 * PI * R A = PI * R ^ 2 Text2.Text = Str(C) Text3.Text = Str(A) End Sub |
|