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

📄 1clcx4.txt

📁 利用VB开发测量限差自动计算程序
💻 TXT
📖 第 1 页 / 共 2 页
字号:
         Left            =   1440
         TabIndex        =   30
         Top             =   600
         Width           =   255
      End
      Begin VB.Label Label18 
         Caption         =   "度"
         Height          =   255
         Left            =   720
         TabIndex        =   29
         Top             =   600
         Width           =   255
      End
      Begin VB.Label Label17 
         AutoSize        =   -1  'True
         Caption         =   "B"
         Height          =   180
         Left            =   120
         TabIndex        =   28
         Top             =   600
         Width           =   90
      End
      Begin VB.Label Label16 
         Caption         =   "秒"
         Height          =   255
         Left            =   2160
         TabIndex        =   24
         Top             =   240
         Width           =   255
      End
      Begin VB.Label Label15 
         Caption         =   "分"
         Height          =   255
         Left            =   1440
         TabIndex        =   23
         Top             =   240
         Width           =   255
      End
      Begin VB.Label Label14 
         Caption         =   "度"
         Height          =   255
         Left            =   720
         TabIndex        =   22
         Top             =   240
         Width           =   255
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         Caption         =   "A"
         Height          =   180
         Left            =   120
         TabIndex        =   21
         Top             =   240
         Width           =   90
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "盘左"
      Height          =   1695
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   2655
      Begin VB.TextBox Text6 
         Height          =   270
         Left            =   1800
         TabIndex        =   20
         Text            =   "10"
         Top             =   720
         Width           =   375
      End
      Begin VB.TextBox Text5 
         Height          =   270
         Left            =   960
         TabIndex        =   19
         Text            =   "50"
         Top             =   720
         Width           =   375
      End
      Begin VB.TextBox Text4 
         Height          =   270
         Left            =   360
         TabIndex        =   17
         Text            =   "49"
         Top             =   720
         Width           =   255
      End
      Begin VB.TextBox Text3 
         Height          =   270
         Left            =   1800
         TabIndex        =   12
         Text            =   "20"
         Top             =   360
         Width           =   375
      End
      Begin VB.TextBox Text2 
         Height          =   270
         Left            =   960
         TabIndex        =   11
         Text            =   "1"
         Top             =   360
         Width           =   375
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   360
         TabIndex        =   10
         Text            =   "0"
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label8 
         Caption         =   "秒"
         Height          =   255
         Left            =   2280
         TabIndex        =   18
         Top             =   720
         Width           =   255
      End
      Begin VB.Label Label7 
         Caption         =   "分"
         Height          =   255
         Left            =   1440
         TabIndex        =   16
         Top             =   720
         Width           =   255
      End
      Begin VB.Label Label6 
         Caption         =   "度"
         Height          =   255
         Left            =   720
         TabIndex        =   15
         Top             =   720
         Width           =   255
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "B"
         Height          =   180
         Left            =   120
         TabIndex        =   14
         Top             =   720
         Width           =   90
      End
      Begin VB.Label Label4 
         Caption         =   "秒"
         Height          =   255
         Left            =   2280
         TabIndex        =   13
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label3 
         Caption         =   "分"
         Height          =   255
         Left            =   1440
         TabIndex        =   9
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label2 
         Caption         =   "度"
         Height          =   255
         Left            =   720
         TabIndex        =   8
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "A"
         Height          =   180
         Left            =   120
         TabIndex        =   7
         Top             =   360
         Width           =   90
      End
   End
End
Attribute VB_Name = "FrmCH"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim duLA%, fenLA%, miaoLA%, duLB%, fenLB%, miaoLB%, duLC%, fenLC%, miaoLC%
Dim duRA%, fenRA%, miaoRA%, duRB%, fenRB%, miaoRB%, duRC%, fenRC%, miaoRC%
Dim duHAL%, fenHAL%, miaoHAL%, duHAR%, fenHAR%, miaoHAR%
Dim halfL As Double, halfR As Double, angle As Double

duLA = Val(Text1.Text)
fenLA = Val(Text2.Text)
miaoLA = Val(Text3.Text)

duLB = Val(Text4.Text)
fenLB = Val(Text5.Text)
miaoLB = Val(Text6.Text)

duRA = Val(Text10.Text)
fenRA = Val(Text11.Text)
miaoRA = Val(Text12.Text)

duRB = Val(Text13.Text)
fenRB = Val(Text14.Text)
miaoRB = Val(Text15.Text)


halfL = (duLB - duLA) + (fenLB - fenLA) / 60 + (miaoLB - miaoLA) / 3600

halfR = (duRB - duRA) + (fenRB - fenRA) / 60 + (miaoRB - miaoRA) / 3600

    If Abs(halfL - halfR) * 3600 > 40 Then
    MsgBox "半测回差超限,请检查观测和输入是否正确!", , "角差超限"

    Exit Sub
    End If
angle = (halfL + halfR) / 2

duHAL = Int(halfL)
halfL = (halfL - duHAL) * 60

fenHAL = Int(halfL)
halfL = (halfL - fenHAL) * 60
miaoHAL = Int(halfL + 0.5)

duHAR = Int(halfR)
halfR = (halfR - duHAR) * 60

fenHAR = Int(halfR)
halfR = (halfR - fenHAR) * 60
miaoHAR = Int(halfR + 0.5)

duWH = Int(angle)
angle = (angle - fenWH) * 60
miaoWH = Int(angle + 0.5)

Text19.Text = Str(duHAL): Text20.Text = Str(fenHAL): Text21.Text = Str(miaoHAL)
Text22.Text = Str(duHAR): Text23.Text = Str(fenHAR): Text24.Text = Str(miaoHAR)
Text25.Text = Str(duWH): Text26.Text = Str(fenWH): Text27.Text = Str(miaoWH)



End Sub

Private Sub Command2_Click()
Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
Text5.Text = "": Text6.Text = "": Text10.Text = "": Text11.Text = ""
Text12.Text = "": Text13.Text = "": Text14.Text = "": Text15.Text = ""
Text19.Text = "": Text20.Text = "": Text21.Text = "": Text22.Text = ""
Text23.Text = "": Text24.Text = "": Text25.Text = "": Text26.Text = ""
Text27.Text = "": Text1.SetFocus
End Sub

Private Sub Command3_Click()
FrmZhu.Show
Unload Me
End Sub

⌨️ 快捷键说明

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