VB经纬度与图幅号的相互转换程序.doc

  1. 1、本文档共11页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VB经纬度与图幅号的相互转换程序

VB经纬度与图幅号转换程序代码 1 Form1(图3.1)程序代码: (1) Command1: Private Sub Command1_Click() If Option1.Value = True Then Form1.Hide Form2.Show ElseIf Option2.Value = True Then Form1.Hide Form3.Show ElseIf Option1.Value = False And Option2.Value = False Then MsgBox 请选择模式!, 48, 错误提示 End If End Sub (2) Command2: Private Sub Command2_Click() End End Sub (3) Command3: Private Sub Command3_Click() a = 软件介绍: b = 本软件适用于我国范围内的经纬度与地形图图幅号相互转换 c = 联系方式:QQ 497159625 d = a + vbCrLf + b + vbCrLf + c e = MsgBox(d, 0, 关于) End Sub 2 Form2(图3.2)程序代码: (1)Form: Private Sub Form_Load() Text3.Enabled = False End Sub (2)Command1: Private Sub Command1_Click() If Text1.Text = Or Text2.Text = Or Val(Text1.Text) 72 Or Val(Text1.Text) 138 Or Val(Text2.Text) 0 Or Val(Text2.Text) 60 Then MsgBox 请正确输入经纬度!, 48, 错误提示 End If j = Val(Text1.Text) w = Val(Text2.Text) jd = Int(j) + (Int(j * 100) Mod 100) / 60 + ((j * 10000) Mod 100) / 3600 wd = Int(w) + (Int(w * 100) Mod 100) / 60 + ((w * 10000) Mod 100) / 3600 x = Int(wd) Mod 4 + wd - Int(wd) y = Int(jd) Mod 6 + jd - Int(jd) a = Chr(Int(wd / 4) + 65) b = Str(Int(jd / 6) + 31) If Option1.Value = True Then Text3.Text = a b ElseIf Option2.Value = True Then c = 2 - Int(x / 2) d = Int(y / 3) + 1 h = Format(c, 000) l = Format(d, 000) Text3.Text = a b B h l ElseIf Option3.Value = True Then c = 4 - Int(x / 1) d = Int(y / 1.5) + 1 h = Format(c, 000) l = Format(d, 000) Text3.Text = a b C h l ElseIf Option4.Value = True Then c = 12 - Int(x / (1 / 3)) d = Int(y / 0.5) + 1 h = Format(c, 000) l = Format(d, 000) Text3.Text = a b D h l ElseIf Option5.Value = True Then c = 24 - Int(x / (1 / 6)) d = Int(y / 0.25) + 1 h = Format(c, 000) l = Format(d, 000) Text3.Text = a b E h l ElseIf Option6.Value = True Then c = 48 - Int(x / (1 / 12)) d = Int(y / (1 / 8)) + 1 h = Format(c, 000) l = Format(d, 000) Text3.Text = a b F h l ElseIf Option7.Value = True Then c = 96 - Int(x / (

文档评论(0)

pangzilva + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档