一、
uses
...comobj;
var
OleMapInfo:variant;
...
procedure Tform1.formcreate(sender:Tobject);
begin
OleMapInfo := CreateOLEObject('MapInfo.Application');
Str(form1.Handle, sWinHand);
oleMapInfo.Do('Set Application Window ' + sWinHand);
end;
鼠标事件例如:放大
procedure Tform1.ToolButton1Click(Sender: TObject);
begin
olemapinfo.runmenucommand(M_TOOLS_EXPAND);
end;
漫游
procedure Tform1.ToolButton2Click(Sender: TObject);
begin
olemapinfo.runmenucommand(M_TOOLS_RECENTER);
end;
等等
二、创建回调函数
利用activeX,创建Type Library