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

📄 menu.mb

📁 mapbaisic二次开发程序 ,难得啊辛苦得到的
💻 MB
字号:
Include "menu.def"
Include "icons.def"
include "mapbasic.def"
Declare Sub openlayer
Declare Sub  ChangeTitle
Declare Sub covertool
Declare Sub DrawAutoLabels
Declare Sub ExitAutoLabels 
Declare Sub 土地利用规划图
Declare Sub 土地利用结构图
Declare Sub 权属面积统计图
Declare Function GetActiveWindow32 Lib "user32" Alias "GetActiveWindow" () As Integer
Declare Function GetActiveWindow Lib "User" () as SmallInt
Declare Function GetWindowText32 Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Integer ,lpString As String, ByVal cch As Integer) As Integer
Declare Function GetWindowText Lib "User" (ByVal hWnd As SmallInt, lpString As String, ByVal aInt As SmallInt) As SmallInt
Declare Function SetWindowText32 Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Integer, ByVal lpString As String) As Integer
Declare Sub      SetWindowText Lib "User" (ByVal hWnd As SmallInt, ByVal Str As String)

Declare Sub Main
Sub Main 
create	menu "文件[&F]" as
		"打开[&O]...\tCtrl+O/W^O/Mo/XCtrl+o"
			HelpMsg "打开表或工作空间。"
			calling 102,
		"(-",
         "新建[&N]...\tCtrl+n/W^n/Mn/XCtrl+n"
            calling 101,
         "(-",
       "保存[&s]...\tCtrl+s/W^s/Ms/XCtrl+s"
            calling 105,
         "(-",
      ' "关闭[&C]...\tCtrl+c/W^c/Mc/XCtrl+c"
       ' calling 103,
       "关闭所有" calling 104,
       "退出[&X]\tAlt+F4"
			HelpMsg "退出 MapInfo Professional。"    calling 113	
       
 Create Menu "添加图层" As

          
         "现状面(B11)"         id 2001 calling openlayer,
		"现状线(B12)"         id 2002 calling openlayer,
		"(-",
		"权属面(C11)"         id 2011 calling openlayer,
		"权属线(C12)"         id 2012 calling openlayer,
		"(-",		
		' "等高线(A21)"         id 2021 calling openlayer,
        ' "高程点(A22)"         id 2022 calling openlayer,
		' "(-",
         "注记(D10)"           id 2003 calling openlayer,
		"(-",
		"规划图(D21)"         id 2031 calling openlayer
Create Menu "图层管理[&C]" As
      "打开底图(BaseMap)"      id 2000 calling openlayer,
        "(-",
       "添加图层"  as "添加图层",
       "移除图层"                calling 103
     
  Create menu "地图[&M]" As
        "创建图例[A]"            id 3000 calling 806,
        "改变视图[V]"            id 3001 calling 807,
         "查看整个图层[E]"       id 3002 calling 810,
         "清除自定义注记[C]"     id 3003 calling 812  

  Create menu "自动标注" As 
       "绘制标注..."   Calling DrawAutoLabels,
       "(-",
      "退出自动标注"   Calling ExitAutoLabels
     
  Create menu "专题地图[&T]" As
       "土地利用规划图"          id  4001 calling  土地利用规划图,
       "土地利用统计图"          id  4002 calling  土地利用结构图,
       "权属面积统计图"          id  4003 calling  权属面积统计图

   call ChangeTitle
 create menu "查询[&Q]" as
 "选择" calling 301,
 "SQL选择" calling 302,
"选择全部" calling 303,
"取消选择全部" calling 304,
"(-",
 "查找" calling 305,
"(-",
"计算统计" calling 309


 Create  Menu Bar As "文件[&F]","图层管理[&C]","地图[&M]","专题地图[&T]","查询[&Q]" ,"自动标注"
  End Sub
 

Sub ChangeTitle
  Dim sWinText As String
  Dim n, nWin, nRes As Integer
  If SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN32 Then   '返回操作系统或软件版本的有关信息
    nWin = GetActiveWindow32()
  ElseIf SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN16 Then
    nWin = GetActiveWindow()
  End If
  sWinText = "土地利用信息系统"
  If SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN32 Then
      n = SetWindowText32(nWin, sWinText)
    ElseIf SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN16 Then
      Call SetWindowText(nWin, sWinText)
    End If
 
  End Sub

⌨️ 快捷键说明

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