![](https://cos-cdn.shuashuati.com/pipixue-web/2020-1231-2005-12/ti_inject-812ce.png)
启动Visual Basic 6.0,创建一个“标准EXE”类型的应用程序,模仿案例:求圆面积。输入圆的半径,计算圆面积,保留两位小数显示。程序运行效果如下图。圆周率为 3.1415。 1 所用的控件及属性设置见下表。 控件名 属性 Label1. Caption=“ 1 ” Text1. 2 =“” Command1. Caption=“ 3 ” Text2. 4 =“” 2 按钮 Command1 的单击事件过程代码如下: Private Sub Command1_Click() Dim r, s As Single r = Val( 5 ) s = 6 Text2.Text = Format( 7 ) ' 显示保留 2 位小数 End Sub