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

📄 屏蔽鼠标双击事件.mb

📁 很多的MAPINFO的常见问题下载后可以学习很有帮助
💻 MB
字号:

Include "mapbasic.def"
Include "menu.def"
Include "icons.def"

'*****This is used in in VB OLE
'dim x,y as float
'dim obj1 as object
'x=commandinfo(CMD_INFO_X)
'y=commandinfo(CMD_INFO_y)
'obj1=createpoint(x,y)
'select * from states Where  states.obj  Contains  obj1

declare sub main
declare sub custom_tool_routine
declare sub SelChangedHandler
dim flag as Logical

sub main
call custom_tool_routine
end sub

sub custom_tool_routine
dim i,n as integer
dim name as string
dim x,y as float
dim obj1 as object

flag=FALSE

x=commandinfo(CMD_INFO_X)
y=commandinfo(CMD_INFO_y)
obj1=createpoint(x,y)


n=mapperinfo(FrontWindow(),MAPPER_INFO_LAYERS)

for i=1 to n
if layerinfo(FrontWindow(),i,LAYER_INFO_SELECTABLE)=TRUE and layerinfo(FrontWindow(),i,LAYER_INFO_DISPLAY)<>LAYER_INFO_DISPLAY_OFF  then
name=layerinfo(FrontWindow(),i,LAYER_INFO_NAME)

'note name

select * from name Where obj  Contains  obj1  or obj  Intersects  obj1
'note flag

if flag=TRUE then
Exit For
end if
end if
next

end sub


sub SelChangedHandler
if CommandInfo(CMD_INFO_SELTYPE)=1 or CommandInfo(CMD_INFO_SELTYPE)=3 then
flag=TRUE
end if
end sub
'**********************************************


'*****This is used in mapbasic,but not in VB OLE

'declare sub main
'declare sub custom_tool_routine
'declare sub SelChangedHandler
'dim flag as Logical
'sub main


'Open Table "C:\Program Files\MapInfo\Professional\Data\USA\States.tab" Interactive
'map from states

'Alter ButtonPad ID 1 
'  Add  
'    Separator
'    ToolButton 
'      Icon  MI_CURSOR_ARROW
'      HelpMsg "make a select without a message dialog" 
'      Cursor  MI_CURSOR_ARROW
'      DrawMode  DM_CUSTOM_POINT    
'      Calling  custom_tool_routine 
'   Remove M_TOOLS_SELECTOR
'  Show 
'end sub

'sub custom_tool_routine
'dim i,n as integer
'dim name as string
'dim x,y as float
'dim obj1 as object

'flag=FALSE

'x=commandinfo(CMD_INFO_X)
'y=commandinfo(CMD_INFO_y)
'obj1=createpoint(x,y)


'n=mapperinfo(FrontWindow(),MAPPER_INFO_LAYERS)

'for i=1 to n
'if layerinfo(FrontWindow(),i,LAYER_INFO_SELECTABLE)=TRUE and layerinfo(FrontWindow(),i,LAYER_INFO_DISPLAY)<>LAYER_INFO_DISPLAY_OFF  then
'name=layerinfo(FrontWindow(),i,LAYER_INFO_NAME)

'note name

'select * from name Where obj  Contains  obj1  or obj  Intersects  obj1
'note flag

'if flag=TRUE then
'Exit For
'end if
'end if
'next

'end sub


'sub SelChangedHandler
'if CommandInfo(CMD_INFO_SELTYPE)=1 or CommandInfo(CMD_INFO_SELTYPE)=3 then
'flag=TRUE
'end if
'end sub
'******************************

⌨️ 快捷键说明

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