form1.frm
来自「Visual Basic程序设计视频教程」· FRM 代码 · 共 53 行
FRM
53 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1815
ClientLeft = 60
ClientTop = 360
ClientWidth = 4395
LinkTopic = "Form1"
ScaleHeight = 1815
ScaleWidth = 4395
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 495
Left = 240
TabIndex = 1
Top = 720
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "计算面积和周长"
Height = 495
Left = 2040
TabIndex = 0
Top = 720
Width = 1575
End
Begin VB.Label Label1
Caption = "请输入圆的半径:"
Height = 255
Left = 360
TabIndex = 2
Top = 240
Width = 1575
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim R As Double
Dim mj As Double
Dim zc As Double
Const PI = 3.1415926
R = Val(Text1.Text)
mj = PI * R * R
zc = 2 * PI * R
Form1.Cls
Print "圆的面积是" & mj
Print "圆的周长是" & zc
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?