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

📄 前方交会计算程序.frm

📁 前方交会软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 前方交会计算程序 
   Caption         =   "Frmmain"
   ClientHeight    =   7080
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9735
   LinkTopic       =   "Form1"
   ScaleHeight     =   7080
   ScaleWidth      =   9735
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "清空"
      Height          =   495
      Left            =   7800
      TabIndex        =   29
      Top             =   3720
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "jisuan "
      Height          =   495
      Left            =   3480
      TabIndex        =   28
      Top             =   3720
      Width           =   975
   End
   Begin VB.TextBox Text13 
      Height          =   495
      Left            =   3720
      TabIndex        =   26
      Top             =   6240
      Width           =   1815
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   495
      Left            =   5760
      TabIndex        =   25
      Top             =   3720
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "计算"
      Height          =   495
      Left            =   1200
      TabIndex        =   24
      Top             =   3720
      Width           =   1095
   End
   Begin VB.TextBox Text12 
      Height          =   495
      Left            =   7200
      TabIndex        =   21
      Top             =   5280
      Width           =   1215
   End
   Begin VB.TextBox Text11 
      Height          =   495
      Left            =   4800
      TabIndex        =   20
      Top             =   5280
      Width           =   1215
   End
   Begin VB.TextBox Text10 
      Height          =   495
      Left            =   2040
      TabIndex        =   15
      Top             =   5280
      Width           =   1215
   End
   Begin VB.TextBox Text9 
      Height          =   495
      Left            =   6840
      TabIndex        =   14
      Top             =   2400
      Width           =   1215
   End
   Begin VB.TextBox Text8 
      Height          =   495
      Left            =   4080
      TabIndex        =   13
      Top             =   2400
      Width           =   1215
   End
   Begin VB.TextBox Text7 
      Height          =   495
      Left            =   1320
      TabIndex        =   12
      Top             =   2400
      Width           =   1215
   End
   Begin VB.TextBox Text6 
      Height          =   495
      Left            =   6840
      TabIndex        =   5
      Top             =   1320
      Width           =   1215
   End
   Begin VB.TextBox Text5 
      Height          =   495
      Left            =   4080
      TabIndex        =   4
      Top             =   1320
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Height          =   495
      Left            =   1320
      TabIndex        =   3
      Top             =   1320
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   6840
      TabIndex        =   2
      Top             =   480
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   4080
      TabIndex        =   1
      Top             =   480
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1320
      TabIndex        =   0
      Top             =   480
      Width           =   1215
   End
   Begin VB.Label Label13 
      Caption         =   "竖直角"
      Height          =   495
      Left            =   2400
      TabIndex        =   27
      Top             =   6240
      Width           =   735
   End
   Begin VB.Label Label12 
      Caption         =   "b"
      Height          =   495
      Left            =   5880
      TabIndex        =   23
      Top             =   2400
      Width           =   375
   End
   Begin VB.Label Label11 
      Caption         =   "a"
      Height          =   495
      Left            =   3120
      TabIndex        =   22
      Top             =   2400
      Width           =   375
   End
   Begin VB.Label Label10 
      Caption         =   "ZP"
      Height          =   495
      Left            =   6480
      TabIndex        =   19
      Top             =   5280
      Width           =   375
   End
   Begin VB.Label Label9 
      Caption         =   "YP"
      Height          =   495
      Left            =   3960
      TabIndex        =   18
      Top             =   5280
      Width           =   375
   End
   Begin VB.Label Label8 
      Caption         =   "XP"
      Height          =   495
      Left            =   960
      TabIndex        =   17
      Top             =   5280
      Width           =   495
   End
   Begin VB.Label Label7 
      Caption         =   "DAB"
      Height          =   495
      Left            =   480
      TabIndex        =   16
      Top             =   2400
      Width           =   615
   End
   Begin VB.Label Label6 
      Caption         =   "ZB"
      Height          =   495
      Left            =   5880
      TabIndex        =   11
      Top             =   1320
      Width           =   495
   End
   Begin VB.Label Label5 
      Caption         =   "YB"
      Height          =   495
      Left            =   3240
      TabIndex        =   10
      Top             =   1440
      Width           =   255
   End
   Begin VB.Label Label4 
      Caption         =   "XB"
      Height          =   495
      Left            =   480
      TabIndex        =   9
      Top             =   1320
      Width           =   375
   End
   Begin VB.Label Label3 
      Caption         =   "ZA"
      Height          =   495
      Left            =   6000
      TabIndex        =   8
      Top             =   480
      Width           =   375
   End
   Begin VB.Label Label2 
      Caption         =   "YA:"
      Height          =   495
      Left            =   3240
      TabIndex        =   7
      Top             =   480
      Width           =   375
   End
   Begin VB.Label Label1 
      Caption         =   "XA:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   360
      TabIndex        =   6
      Top             =   480
      Width           =   615
   End
End
Attribute VB_Name = "前方交会计算程序"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim XA As Double
Dim XB As Double
Dim Xp As Double
Dim YA As Double
Dim YB As Double
Dim Yp As Double
Dim ZA As Double
Dim ZB As Double
Dim Zp As Double
Dim DAB As Double
Dim a As Double
Dim b As Double
Dim v As Double, pa As Double
XA = Text1.Text
YA = Text2.Text
ZA = Text3.Text
XB = Text4.Text
YB = Text5.Text
ZB = Text6.Text
v = Text13.Text
DAB = Text7.Text
a = Text8.Text
b = Text9.Text
Xp = (XA * Tan(a) + XB * Tan(b) + (YB - YA) * Tan(a) * Tan(b)) / (Tan(a) + Tan(b))
Yp = (YA * Tan(a) + YB * Tan(b) + (XA - XB) * Tan(a) * Tan(b)) / (Tan(a) + Tan(b))
Zp = DAB * Sin(b) * Tan(v) / Sin(3.14159265 - a - b)
pa = DAB * Sin(b) / Sin(3.14159265 - a - b)
Text10.Text = Xp
Text11.Text = Yp
Text12.Text = Zp
Print pa
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Dim XA As Double
Dim XB As Double
Dim Xp As Double
Dim YA As Double
Dim YB As Double
Dim Yp As Double
Dim ZA As Double
Dim ZB As Double
Dim Zp As Double
Dim DAB As Double
Dim a As Double
Dim b As Double
Dim v As Double, pa As Double
v = GW(Val(Text13.Text))
a = GW(Val(Text8.Text))
b = GW(Val(Text9.Text))
Text1.Text = 0: Text2.Text = 0:  Text3.Text = 0: Text4.Text = 18.0101: Text5.Text = 0: Text7.Text = 18.0101
XA = Text1.Text
YA = Text2.Text
ZA = Text3.Text
XB = Text4.Text
YB = Text5.Text
DAB = Text7.Text
Xp = (XA * Tan(a) + XB * Tan(b) + (YB - YA) * Tan(a) * Tan(b)) / (Tan(a) + Tan(b))
Yp = (YA * Tan(a) + YB * Tan(b) + (XA - XB) * Tan(a) * Tan(b)) / (Tan(a) + Tan(b))
Zp = DAB * Sin(b) * Tan(v) / Sin(3.14159265 - a - b)
pa = DAB * Sin(b) / Sin(3.14159265 - a - b)
Text10.Text = Xp
Text11.Text = Yp
Text12.Text = Zp
'Print GW(a)
End Sub

Public Function GW(Ang As Double) As Double '角度化弧度
        Dim t1 As Double
        Dim t2 As Double
        Dim T3 As Double
        Dim T4 As Double
        Dim t As Double
        If Abs(Ang) < 1E-24 Then
            t = 1
        Else
             t = Ang / Abs(Ang)
        End If
        t1 = Abs(Ang)
        t2 = Int(t1 + 0.0000001)
        T3 = (t1 - t2) * 100#
        T4 = Int(T3 + 0.0000001)
        T5 = (t2 + T4 / 60# + (T3 - T4) / 36#) * 3.14159265 / 180#
        GW = T5 * t
End Function

Private Sub Command4_Click()
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
End Sub

⌨️ 快捷键说明

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