uses oleauto,...var
Form1: TForm1;
OleMapInfo: Variant;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
OleMapinfo:=createOleObject('mapinfo.application');
end;procedure TForm1.Button1Click(Sender: TObject);
var
MsgString: String;
sWinHand: String;
begin
MsgString:='Set Next Document Parent'+ sWinHand+ 'Style 1' ;
OleMapinfo.do(MsgString) ;
MsgString:= 'set application windows'+sWinHand;
OleMapinfo.do(MsgString) ;
OleMapinfo.do('open table"e:\scorpio\111.tab"') ;
OleMapinfo.do('map from 111 max') ;
end;end.编译后:Project Project1.exe raised exception class EOleException with message '不能识别的命令:ParentStyle。'.Process stopped.Use Step to continue.请问是在uses声明是出错?
Form1: TForm1;
OleMapInfo: Variant;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
OleMapinfo:=createOleObject('mapinfo.application');
end;procedure TForm1.Button1Click(Sender: TObject);
var
MsgString: String;
sWinHand: String;
begin
MsgString:='Set Next Document Parent'+ sWinHand+ 'Style 1' ;
OleMapinfo.do(MsgString) ;
MsgString:= 'set application windows'+sWinHand;
OleMapinfo.do(MsgString) ;
OleMapinfo.do('open table"e:\scorpio\111.tab"') ;
OleMapinfo.do('map from 111 max') ;
end;end.编译后:Project Project1.exe raised exception class EOleException with message '不能识别的命令:ParentStyle。'.Process stopped.Use Step to continue.请问是在uses声明是出错?
'...Parent'+ sWinHand在Parent和sWinHand之间没有空格造成的??