⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 这里包含了测量计算过程中所需要的各种小程序。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5670
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9645
   LinkTopic       =   "Form1"
   ScaleHeight     =   5670
   ScaleWidth      =   9645
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0FFC0&
      Caption         =   "坐标反算"
      Height          =   4935
      Left            =   5040
      TabIndex        =   1
      Top             =   600
      Width           =   4455
      Begin VB.CommandButton Command4 
         Caption         =   "退出"
         Height          =   495
         Left            =   2640
         TabIndex        =   29
         Top             =   4200
         Width           =   1455
      End
      Begin VB.CommandButton Command3 
         Caption         =   "计算"
         Height          =   495
         Left            =   360
         TabIndex        =   28
         Top             =   4200
         Width           =   1215
      End
      Begin VB.Frame Frame8 
         Caption         =   "输出距离和方位角"
         Height          =   975
         Left            =   240
         TabIndex        =   27
         Top             =   2880
         Width           =   4095
         Begin VB.TextBox Text16 
            Height          =   270
            Left            =   960
            TabIndex        =   40
            Text            =   "Text16"
            Top             =   600
            Width           =   2535
         End
         Begin VB.TextBox Text13 
            Height          =   270
            Left            =   960
            TabIndex        =   38
            Text            =   "Text13"
            Top             =   240
            Width           =   2535
         End
         Begin VB.Label Label17 
            Caption         =   "米"
            Height          =   255
            Left            =   3600
            TabIndex        =   44
            Top             =   600
            Width           =   255
         End
         Begin VB.Label Label16 
            Caption         =   "分"
            Height          =   255
            Left            =   2760
            TabIndex        =   43
            Top             =   240
            Width           =   255
         End
         Begin VB.Label Label19 
            Caption         =   "SAB="
            Height          =   255
            Left            =   360
            TabIndex        =   42
            Top             =   600
            Width           =   495
         End
         Begin VB.Label Label18 
            Caption         =   "aAB="
            Height          =   255
            Left            =   240
            TabIndex        =   41
            Top             =   240
            Width           =   495
         End
         Begin VB.Label Label15 
            Caption         =   "度"
            Height          =   255
            Left            =   3600
            TabIndex        =   39
            Top             =   240
            Width           =   255
         End
      End
      Begin VB.Frame Frame7 
         Caption         =   "输入第二点的坐标"
         Height          =   1215
         Left            =   240
         TabIndex        =   26
         Top             =   1560
         Width           =   4095
         Begin VB.TextBox Text12 
            Height          =   375
            Left            =   1080
            TabIndex        =   37
            Text            =   "Text12"
            Top             =   720
            Width           =   2655
         End
         Begin VB.TextBox Text11 
            Height          =   375
            Left            =   1080
            TabIndex        =   36
            Text            =   "Text11"
            Top             =   240
            Width           =   2655
         End
         Begin VB.Label Label14 
            Caption         =   "Y2="
            Height          =   255
            Left            =   600
            TabIndex        =   33
            Top             =   840
            Width           =   375
         End
         Begin VB.Label Label13 
            Caption         =   "X2="
            Height          =   255
            Left            =   600
            TabIndex        =   32
            Top             =   360
            Width           =   375
         End
      End
      Begin VB.Frame Frame6 
         Caption         =   "输入第一点的坐标"
         Height          =   1215
         Left            =   240
         TabIndex        =   25
         Top             =   240
         Width           =   4095
         Begin VB.TextBox Text10 
            Height          =   375
            Left            =   1080
            TabIndex        =   35
            Text            =   "Text10"
            Top             =   720
            Width           =   2655
         End
         Begin VB.TextBox Text9 
            Height          =   375
            Left            =   1080
            TabIndex        =   34
            Text            =   "Text9"
            Top             =   240
            Width           =   2655
         End
         Begin VB.Label Label12 
            Caption         =   "Y1="
            Height          =   255
            Left            =   720
            TabIndex        =   31
            Top             =   840
            Width           =   375
         End
         Begin VB.Label Label11 
            Caption         =   "X1="
            Height          =   255
            Left            =   720
            TabIndex        =   30
            Top             =   240
            Width           =   255
         End
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFC0&
      Caption         =   "坐标正算"
      Height          =   4935
      Left            =   480
      TabIndex        =   0
      Top             =   600
      Width           =   4455
      Begin VB.CommandButton Command2 
         Caption         =   "退出"
         Height          =   375
         Left            =   2760
         TabIndex        =   20
         Top             =   4320
         Width           =   1095
      End
      Begin VB.CommandButton Command1 
         Caption         =   "计算"
         Height          =   375
         Left            =   480
         TabIndex        =   19
         Top             =   4320
         Width           =   855
      End
      Begin VB.Frame Frame5 
         Caption         =   "Frame5"
         Height          =   1095
         Left            =   120
         TabIndex        =   18
         Top             =   3000
         Width           =   4095
         Begin VB.TextBox Text8 
            Height          =   270
            Left            =   1080
            TabIndex        =   24
            Text            =   "Text8"
            Top             =   600
            Width           =   2535
         End
         Begin VB.TextBox Text7 
            Height          =   270
            Left            =   1080
            TabIndex        =   22
            Text            =   "Text7"
            Top             =   240
            Width           =   2535
         End
         Begin VB.Label Label10 
            Caption         =   "Y2="
            Height          =   255
            Left            =   600
            TabIndex        =   23
            Top             =   600
            Width           =   375
         End
         Begin VB.Label Label9 
            Caption         =   "X2="
            Height          =   255
            Left            =   600
            TabIndex        =   21
            Top             =   240
            Width           =   375
         End
      End
      Begin VB.Frame Frame4 
         Caption         =   "输入方位角和距离"
         Height          =   1095
         Left            =   120
         TabIndex        =   3
         Top             =   1800
         Width           =   4095
         Begin VB.TextBox Text6 
            Height          =   270
            Left            =   1200
            TabIndex        =   17
            Text            =   "Text6"
            Top             =   720
            Width           =   2415
         End
         Begin VB.TextBox Text5 
            Height          =   270
            Left            =   3120
            TabIndex        =   11
            Text            =   "Text5"
            Top             =   240
            Width           =   495
         End
         Begin VB.TextBox Text4 
            Height          =   270
            Left            =   2160
            TabIndex        =   10
            Text            =   "Text4"
            Top             =   240
            Width           =   615
         End
         Begin VB.TextBox Text3 
            Height          =   270
            Left            =   1200
            TabIndex        =   9
            Text            =   "Text3"
            Top             =   240
            Width           =   615
         End
         Begin VB.Label Label8 
            Caption         =   "S="
            Height          =   375
            Left            =   720
            TabIndex        =   16
            Top             =   720
            Width           =   495
         End
         Begin VB.Label Label7 
            Caption         =   "aAB="
            Height          =   375
            Left            =   600
            TabIndex        =   15
            Top             =   240
            Width           =   495
         End
         Begin VB.Label Label6 
            Caption         =   "秒"
            Height          =   255
            Left            =   3720
            TabIndex        =   14
            Top             =   240
            Width           =   255
         End
         Begin VB.Label Label5 
            Caption         =   "分"
            Height          =   255
            Left            =   2880
            TabIndex        =   13
            Top             =   240
            Width           =   255
         End
         Begin VB.Label Label4 
            Caption         =   "度"
            Height          =   255
            Left            =   1920
            TabIndex        =   12
            Top             =   240
            Width           =   255
         End
      End
      Begin VB.Frame Frame3 
         Caption         =   "输入坐标"
         Height          =   1215
         Left            =   120
         TabIndex        =   2
         Top             =   360
         Width           =   4095
         Begin VB.TextBox Text2 
            Height          =   375
            Left            =   1440
            TabIndex        =   6
            Text            =   "Text2"
            Top             =   720
            Width           =   2295
         End
         Begin VB.TextBox Text1 
            Height          =   375
            Left            =   1440
            TabIndex        =   5
            Text            =   "Text1"
            Top             =   240
            Width           =   2295
         End
         Begin VB.Label Label3 
            Caption         =   "Y1="
            Height          =   255
            Left            =   1080
            TabIndex        =   8
            Top             =   840
            Width           =   375
         End
         Begin VB.Label Label2 
            Caption         =   "X1="
            Height          =   255
            Left            =   1080
            TabIndex        =   7
            Top             =   360
            Width           =   375
         End
      End
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0C0FF&
      Caption         =   "坐标正反算"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4200
      TabIndex        =   4
      Top             =   0
      Width           =   1695
   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 x1, x2, y1, y2, s, a, a1, a2, a3, a4 As Double
x1 = Val(Text1.Text)
y1 = Val(Text2.Text)
s = Val(Text6.Text)
a1 = Val(Text3.Text)
a2 = Val(Text4.Text)
a3 = Val(Text5.Text)
a = a1 + a2 / 60 + a3 / 3600
a4 = a * 3.14159265358979 / 180
x2 = x1 + s * Cos(a4)
y2 = y1 + s * Sin(a4)
Text7.Text = x2
Text8.Text = y2
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Dim x11, x21, y11, y21, s1, a1, a11, a21, a31, a41 As Double
x11 = Val(Text9.Text)
y11 = Val(Text10.Text)
x21 = Val(Text11.Text)
y21 = Val(Text12.Text)
If x21 = x11 Then
Debug.Print x11
a21 = 90
a31 = 0
a41 = 0
Else
Debug.Print 444
a1 = Atn((y11 - y21) / (x11 - x21))
a11 = a1 * 180 / 3.14159265358979

End If
s1 = Sqr((x11 - x21) ^ 2 + (y11 - y21) ^ 2)
Text13.Text = a11

Text16.Text = s1
End Sub

Private Sub Command4_Click()
End
End Sub

Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""



End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -