1、 坐标正反算vb测量程序 河北工程大学 测绘1001 刘长君以下是登陆界面和计算界面的截图:以下就是对应的代码:登陆界面的代码Private Sub Command1_Click()If Text1.Text = 刘长君 And Text2.Text = 100510130 ThenForm2.ShowUnload MeElseDim a As Integera = MsgBox(密码输入有误,请重新输入, 1, 提示框)If a = 1 ThenText2.Text = Text2.SetFocusEnd IfEnd IfEnd SubPrivate Sub Command2_Click()
2、EndEnd Sub计算界面的代码Private Sub Command1_Click(Index As Integer)Dim a1%, a2%, a3%, a4!, a5!, pi!Const conpi = 3.14159265358979If IsNumeric(Text1(1) = False Or IsNumeric(Text2(2) = False Or IsNumeric(Text3(3) = False Or IsNumeric(Text4(4) = False Or IsNumeric(Text5(5) = False Or IsNumeric(Text6(6) = Fal
3、se ThenMsgBox 输入有误Text1(1).SetFocusElse If Val(Trim(Text5(5).Text) 60 Or Val(Trim(Text5(5).Text) 60 Or Val(Trim(Text6(6).Text) 0 ThenLabel31.Caption = 90: Label32.Caption = 0: Label33.Caption = 0ElseIf dx = 0 And dy 0 And dy 0 Then a12 = r12 ElseIf dx 0 Then a12 = pi - r12 ElseIf dx 0 And dy 0 And d
4、y 0 Then a12 = 2 * pi - r12 End If a12 = a12 / conpi * 180 Label31.Caption = Fix(a12) Label32.Caption = Abs(Fix(a12 - Fix(a12) * 60) Label33.Caption = Abs(Fix(a12 - Fix(a12) * 60) - Fix(a12 - Fix(a12) * 60) * 60) End If End IfEnd SubPrivate Sub Command4_Click()Text7.Text = Text8.Text = Text9.Text = Text10.Text = Label25.Caption = Label31.Caption = Label32.Caption = Label33.Caption = Text7.SetFocusEnd SubPrivate Sub Timer1_Timer()Label34.Left = Label34.Left + 20If Label34.Left = 12300 ThenLabel34.Left = 0End IfEnd Sub