Const pi As Double = 3.141592
Private Sub Form_Resize()
Dim rad As Integer
Dim area As Double
Dim pre As Double rad = 10
area = pi * rad * rad
pre = 2 * pi * rad Print "半径="; rad
Print "圆面积="; area
Print "圆周长="; pre
End Sub
Private Sub Form_Load() ……End Sub之间的Print 语句,是无法显示在窗体上的,建议写在窗体的单击事件里。如下:Private Sub Form_Click()……End Sub