www.ctrt.net > 上边的文本框中输入半径然后点击按钮后在下边的文...

上边的文本框中输入半径然后点击按钮后在下边的文...

我帮你改了下, 半径: 结果:

在form1中依次添加2个文本框和1个按钮。然后输入如下代码 Private Sub Command1_Click() Dim R As Double If IsNumeric(Text1.Text) Then R = Val(Text1.Text) If R > 0 Then Text2.Text = Str(3.14159265 * R * R) End If End Sub 运行即可。

使用javax.swing.Action public class NumberAction extends AbstractAction { private static final long serialVersionUID = -3941319225168433304L; private transient JTextField input; public NumberAction(final String label, final JTe...

①方法1: Private Sub Command1_Click() Dim p As Single Dim s As Single Dim r As Single p = 3.1415 '定义PAI的值 r = Val(Text1) s = p * r ^ 2 '面积公式 c = 2 * p * r '周长公式 Label2.Caption = c '标签2输出周长结果 Text2 = s '文本...

Private Sub Command1_Click() Dim pi As Double pi = 3.1415629 Dim s As Double Dim l As Double Dim r As Double r = Val(Text1.Text) s = pi * r * r l = 2 * pi * r Print " 面积= " & s Print "周长= " & l End Sub

Private Sub Command1_Click() If Not IsNumeric(Text1) Then MsgBox "xxx" Text1.SetFocus Exit Sub End If Dim r As Single r = Val(Text1.Text) Text2.Text = 3.14 * r * r End Sub Private Sub Command2_Click() If Not IsNumeric(Text2) Th...

1、新建一个图层; 2、执行“滤镜——锐化——智能锐化”命令; 3、在弹出的窗口中,在“数量”文本框里输入46、在“半径”文本框里输入0.8、在“移去”文本框里点击下拉箭头,选择“高斯模糊”。 4、还有一个忘记了,在“设置”文本框里点击下拉箭头,选择“默认...

。。。。 πr²有半径直接就能得到面积值啊 2πr不就是周长吗,后台计算一下再输出

定义一个变体 GETOBJECT得到一个实体 检查得到的实体是否是圆 如果是圆,则取其两个属必_-圆心坐标与半径

Option Explicit Dim r As Single Dim h As Single Dim A As Double Dim L As Double Dim V As Double Dim pi As Single Private Sub Form_Load() pi = 3.14159 r = InputBox("请输入半径") '圆柱高 h = InputBox("请圆柱高") L = pi * 2 * r Te...

网站地图

All rights reserved Powered by www.ctrt.net

copyright ©right 2010-2021。
www.ctrt.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com