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

📄 距离测量的精度.frm

📁 距离相对误差计算。可以方便计算距离的相对误差
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "距离测量的精度"
   ClientHeight    =   2100
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   2895
   LinkTopic       =   "Form1"
   ScaleHeight     =   2100
   ScaleWidth      =   2895
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command2 
      Caption         =   "清零"
      Height          =   735
      Left            =   2160
      TabIndex        =   13
      Top             =   1200
      Width           =   615
   End
   Begin VB.CommandButton Command1 
      Caption         =   "计算"
      Height          =   735
      Left            =   2160
      TabIndex        =   12
      Top             =   120
      Width           =   615
   End
   Begin VB.TextBox Text4 
      Height          =   285
      Left            =   960
      TabIndex        =   9
      Top             =   1680
      Width           =   975
   End
   Begin VB.TextBox Text3 
      Height          =   285
      Left            =   720
      TabIndex        =   8
      Top             =   1155
      Width           =   975
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   720
      TabIndex        =   3
      Top             =   555
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   720
      TabIndex        =   2
      Top             =   75
      Width           =   975
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "米"
      Height          =   195
      Left            =   1800
      TabIndex        =   11
      Top             =   1200
      Width           =   180
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "1/"
      Height          =   195
      Left            =   720
      TabIndex        =   10
      Top             =   1680
      Width           =   165
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "精度:"
      Height          =   195
      Left            =   120
      TabIndex        =   7
      Top             =   1680
      Width           =   540
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "平均:"
      Height          =   195
      Left            =   120
      TabIndex        =   6
      Top             =   1200
      Width           =   540
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "米"
      Height          =   195
      Left            =   1800
      TabIndex        =   5
      Top             =   600
      Width           =   180
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "米"
      Height          =   195
      Left            =   1800
      TabIndex        =   4
      Top             =   120
      Width           =   180
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "返测:"
      Height          =   195
      Left            =   120
      TabIndex        =   1
      Top             =   600
      Width           =   540
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "往测:"
      Height          =   195
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   540
   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 Sw#, Sf#, Sa#, Sd#, r#
    
    Sw = Val(Text1.Text)
    Sf = Val(Text2.Text)
    Sa = (Sw + Sf) / 2
    Sd = Abs(Sw - Sf)
    r = Int(0.01 * Sa / Sd) * 100
    
    Text3.Text = Trim(Str(Sa))
    Text4.Text = Trim(Str(r))
End Sub

Private Sub Command2_Click()
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text1.SetFocus
End Sub

⌨️ 快捷键说明

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