📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5265
ClientLeft = 60
ClientTop = 345
ClientWidth = 7050
LinkTopic = "Form1"
ScaleHeight = 5265
ScaleWidth = 7050
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "退出"
Height = 615
Left = 3960
TabIndex = 3
Top = 3720
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 615
Left = 720
TabIndex = 2
Top = 3720
Width = 1455
End
Begin VB.Frame Frame2
Caption = "输出结果"
Height = 855
Left = 240
TabIndex = 1
Top = 2520
Width = 6495
Begin VB.TextBox Text6
Height = 375
Left = 2160
TabIndex = 17
Text = "Text6"
Top = 240
Width = 1695
End
Begin VB.Label Label7
Caption = "改正后的边长"
Height = 255
Left = 720
TabIndex = 19
Top = 360
Width = 1095
End
Begin VB.Label Label6
Caption = "D="
Height = 375
Left = 1920
TabIndex = 18
Top = 360
Width = 615
End
End
Begin VB.Frame Frame1
Caption = "输入归心元素"
Height = 1935
Left = 120
TabIndex = 0
Top = 120
Width = 6735
Begin VB.Frame Frame5
Caption = "测量边长"
Height = 1215
Left = 4680
TabIndex = 6
Top = 480
Width = 1935
Begin VB.TextBox Text5
Height = 375
Left = 480
TabIndex = 11
Text = "Text5"
Top = 600
Width = 1335
End
Begin VB.Label Label5
Caption = "d="
Height = 375
Left = 240
TabIndex = 16
Top = 720
Width = 255
End
End
Begin VB.Frame Frame4
Caption = "第二点"
Height = 1335
Left = 2520
TabIndex = 5
Top = 360
Width = 1935
Begin VB.TextBox Text4
Height = 270
Left = 720
TabIndex = 10
Text = "Text4"
Top = 960
Width = 1095
End
Begin VB.TextBox Text3
Height = 270
Left = 720
TabIndex = 9
Text = "Text3"
Top = 360
Width = 1095
End
Begin VB.Label Label4
Caption = "o2="
Height = 255
Left = 360
TabIndex = 15
Top = 960
Width = 375
End
Begin VB.Label Label3
Caption = "e2="
Height = 255
Left = 360
TabIndex = 14
Top = 360
Width = 255
End
End
Begin VB.Frame Frame3
Caption = "第一点"
Height = 1335
Left = 240
TabIndex = 4
Top = 360
Width = 1815
Begin VB.TextBox Text2
Height = 270
Left = 480
TabIndex = 8
Text = "Text2"
Top = 840
Width = 1095
End
Begin VB.TextBox Text1
Height = 270
Left = 600
TabIndex = 7
Text = "Text1"
Top = 360
Width = 1095
End
Begin VB.Label Label2
Caption = "o1="
Height = 375
Left = 240
TabIndex = 13
Top = 840
Width = 375
End
Begin VB.Label Label1
Caption = "e1="
Height = 255
Left = 240
TabIndex = 12
Top = 360
Width = 375
End
End
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 e1, e2, o1, o2, d, s As Double
e1 = Val(Text1.Text)
e2 = Val(Text3.Text)
o1 = Val(Text2.Text)
o2 = Val(Text4.Text)
s = Val(Text5.Text)
o11 = o1 / 3600 * 3.14159265358979 / 180
o22 = o2 / 3600 * 3.14159265358979 / 180
d = Sqr((s - e1 * Cos(o11) - e2 * Cos(o22)) ^ 2 + (e1 * Sin(o11) + e2 * Sin(o22)) ^ 2)
Text6.Text = d
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -