pepumarius
05-02-2007, 09:58 AM
Hy,
Has anybody found that closing the MapPoint ActiveX control is rather "dangerous"? I have found that on one system the application closed normaly (when closing the main form that contains the ActiveX control) but on other systems, the application hangs and refuses to close. I have to use the Task Manager to kill the process :-( . I mention that i use MapPoint 2006.
What can i do?
Here is the code i use to open (start) the ActiveX control and the code to close it:
var Map1: TMap;
procedure StartMP;
begin
with Form1.OLEContainer do begin
DestroyObject;
CreateObject('MapPoint.Map.EU.13',FALSE);
DoVerb(PrimaryVerb);
OleObjectInterface.GetUserClassID(vGuid);
FMap := IDispatch(OleObject) as _Map;
with Map1 do
ConnectTo(FMap);
end;
end;
//--------------------------
procedure CloseMP;
begin
Form1.Close;
end;
Has anybody found that closing the MapPoint ActiveX control is rather "dangerous"? I have found that on one system the application closed normaly (when closing the main form that contains the ActiveX control) but on other systems, the application hangs and refuses to close. I have to use the Task Manager to kill the process :-( . I mention that i use MapPoint 2006.
What can i do?
Here is the code i use to open (start) the ActiveX control and the code to close it:
var Map1: TMap;
procedure StartMP;
begin
with Form1.OLEContainer do begin
DestroyObject;
CreateObject('MapPoint.Map.EU.13',FALSE);
DoVerb(PrimaryVerb);
OleObjectInterface.GetUserClassID(vGuid);
FMap := IDispatch(OleObject) as _Map;
with Map1 do
ConnectTo(FMap);
end;
end;
//--------------------------
procedure CloseMP;
begin
Form1.Close;
end;