Gauloisid
10-22-2003, 09:27 AM
Hello,
I work on integration of MapPoint 2002 and Delphi.
Because the OCX doesn't work, i've used the method explained
in this article :
http://www.mp2kmag.com/a65-delphi.example.mappoint.html
It work fine until i try to close my application, so the only way i've found is to make a delay after destroying object.
Like this :
procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction);
var
i: Integer;
begin
Carte:= nil;
OleContainer.DestroyObject;
OleContainer.UpdateObject;
OleContainer.Update;
OleContainer.UpdateControlState;
for i:=0 to 10000 do
Forms.Application.ProcessMessages;
Action:= caFree;
end;
I'm not proud with this code but it work, maybe someone have a better idea ?
I've also try to find the handle of the mappoint process and wait until it
not closed.
Thanks in advance...
and sorry for my english
I work on integration of MapPoint 2002 and Delphi.
Because the OCX doesn't work, i've used the method explained
in this article :
http://www.mp2kmag.com/a65-delphi.example.mappoint.html
It work fine until i try to close my application, so the only way i've found is to make a delay after destroying object.
Like this :
procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction);
var
i: Integer;
begin
Carte:= nil;
OleContainer.DestroyObject;
OleContainer.UpdateObject;
OleContainer.Update;
OleContainer.UpdateControlState;
for i:=0 to 10000 do
Forms.Application.ProcessMessages;
Action:= caFree;
end;
I'm not proud with this code but it work, maybe someone have a better idea ?
I've also try to find the handle of the mappoint process and wait until it
not closed.
Thanks in advance...
and sorry for my english