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

📄 form1.frm

📁 利用已给的数据,列如里程之类的工测数据可以简单的算出我们所要的主点里程之类的信息,十分有用.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Caption         =   "E="
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   4200
      TabIndex        =   30
      Top             =   6960
      Width           =   855
   End
   Begin VB.Label Label11 
      Caption         =   "L="
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   2160
      TabIndex        =   28
      Top             =   6960
      Width           =   975
   End
   Begin VB.Label Label10 
      Caption         =   "T="
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   0
      TabIndex        =   26
      Top             =   7080
      Width           =   1095
   End
   Begin VB.Label Label9 
      Caption         =   "A="
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   1320
      TabIndex        =   22
      Top             =   6000
      Width           =   1215
   End
   Begin VB.Label Label8 
      Caption         =   "A2="
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   4320
      TabIndex        =   18
      Top             =   5040
      Width           =   975
   End
   Begin VB.Label Label7 
      Caption         =   "A1="
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   120
      TabIndex        =   14
      Top             =   5040
      Width           =   1575
   End
   Begin VB.Label Label6 
      Caption         =   "Y"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3240
      TabIndex        =   12
      Top             =   360
      Width           =   1095
   End
   Begin VB.Label Label5 
      Caption         =   "X"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1800
      TabIndex        =   11
      Top             =   360
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "半径:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   5280
      TabIndex        =   6
      Top             =   840
      Width           =   2055
   End
   Begin VB.Label Label3 
      Caption         =   "末点坐标:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   120
      TabIndex        =   4
      Top             =   2880
      Width           =   2895
   End
   Begin VB.Label Label2 
      Caption         =   "中点坐标:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   240
      TabIndex        =   2
      Top             =   1920
      Width           =   2655
   End
   Begin VB.Label Label1 
      Caption         =   "起点坐标:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   240
      TabIndex        =   0
      Top             =   960
      Width           =   2655
   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()
   
 X1 = Val(Text1.Text)
 Y1 = Val(Text2.Text)
 X2 = Val(Text3.Text)
 Y2 = Val(Text5.Text)
 x3 = Val(Text6.Text)
 y3 = Val(Text7.Text)
 
 deltx1 = X1 - X2
 delty1 = Y1 - Y2
 length1 = Sqr(deltx1 ^ 2 + delty1 ^ 2)
 
 If deltx1 > 0 And delty1 > 0 Then
    a = Atn(delty1 / deltx1)
ElseIf deltx1 < 0 And delty1 > 0 Then
    a = 3.1415926 - Atn(delty1 / deltx1)
ElseIf deltx1 < 0 And delty1 < 0 Then
    a = 3.1415926 + Atn(delty1 / deltx1)
ElseIf deltx1 > 0 And delty1 < 0 Then
    a = 3.1415926 * 2 - Atn(delty1 / deltx1)
 End If
 If a >= 2 * 3.1415926 Then
   a = a - 3.1415926 * 2
Else
   a = a
End If

 
 
 
 Text8.Text = Int(a * 180 / 3.1415926)
 Text9.Text = Int((a * 180 / 3.1415926 - Int(a * 180 / 3.1415926)) * 60)
 b = Text9.Text
 Text10.Text = Int(((a * 180 / 3.1415926 - Int(a * 180 / 3.1415926)) * 60 - b) * 60)
 
 
deltx2 = x3 - X2
delty2 = y3 - Y2
length2 = Sqr(deltx2 ^ 2 + delty2 ^ 2)



If deltx2 > 0 And delty2 > 0 Then
    c = Atn(delty2 / deltx2)
ElseIf deltx2 < 0 And delty2 > 0 Then
    c = 3.1415926 - Atn(delty2 / deltx2)
ElseIf deltx2 < 0 And delty2 < 0 Then
    c = 3.1415926 + Atn(delty2 / deltx2)
ElseIf deltx2 > 0 And delty2 < 0 Then
    c = 3.1415926 * 2 - Atn(delty2 / deltx2)
 End If
 
 If c >= 2 * 3.1415926 Then
   c = c - 3.1415926 * 2
Else
   c = c
End If
 
 Text11.Text = Int(c * 180 / 3.1415926)
 Text12.Text = Int((c * 180 / 3.1415926 - Int(c * 180 / 3.1415926)) * 60)
 b = Text12.Text
 Text13.Text = Int(((c * 180 / 3.1415926 - Int(c * 180 / 3.1415926)) * 60 - b) * 60)
 
 
 If a > c Then
    d = a - c
    e = 3.1415926 - d
Else
   d = c - a
   e = 3.1415926 - d
End If

Text14.Text = Int(e * 180 / 3.1415926)
 Text15.Text = Int((e * 180 / 3.1415926 - Int(e * 180 / 3.1415926)) * 60)
 b = Text15.Text
 Text16.Text = Int(((e * 180 / 3.1415926 - Int(e * 180 / 3.1415926)) * 60 - b) * 60)
  
If e < 0 Then
  e = -e
End If

r = Val(Text4.Text)
t = r * Tan(e / 2)
L = e * r
e1 = r * (1 / (Cos(e / 2)) - 1)
q = 2 * t - L

Text17 = t
Text18 = L
Text19 = e1
Text20 = q

jd0 = Text21.Text
jd = jd0 + length1
zy = jd - t
yz = zy + L
qz = yz - L / 2

Text22 = jd
Text23 = zy
Text24 = yz
Text25 = qz

 
End Sub

⌨️ 快捷键说明

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