M
maddoc
Unregistered / Unconfirmed
GUEST, unregistred user!
我调用mapinfo,delphi作前台,后台是mapinfo
用ole
我的问题是怎样才能找到mapinfo的句柄,这样才能在panel1中显示
代码如下
procedure TForm1.FormCreate(Sender: TObject);
var oleMapInfo : Variant;
var
msgstring:string;
sWinHand : String;
begin
oleMapInfo := CreateOLEObject('MapInfo.Application');
//Str(panel1.Handle, sWinHand);//这块swinhand应该是mapinfo的句柄,怎样找到呀
msgString := 'Run Application "'
+'d:/test.wor"'; //ExtractFilePath(Application.EXEName) + 'test.wor"';
oleMapInfo.Do(msgString);
olemapinfo.do('note "fajs;ldfjsadlj"');
oleMapInfo.RunMenuCommand(805);
end;
谢谢
用ole
我的问题是怎样才能找到mapinfo的句柄,这样才能在panel1中显示
代码如下
procedure TForm1.FormCreate(Sender: TObject);
var oleMapInfo : Variant;
var
msgstring:string;
sWinHand : String;
begin
oleMapInfo := CreateOLEObject('MapInfo.Application');
//Str(panel1.Handle, sWinHand);//这块swinhand应该是mapinfo的句柄,怎样找到呀
msgString := 'Run Application "'
+'d:/test.wor"'; //ExtractFilePath(Application.EXEName) + 'test.wor"';
oleMapInfo.Do(msgString);
olemapinfo.do('note "fajs;ldfjsadlj"');
oleMapInfo.RunMenuCommand(805);
end;
谢谢