>> show a non modal delphi form in mapinfo:
You need to get the handle from MapInfo within MapBasic with the Win API GetFocus()
Declared in MapBasic like:
Declare Function GetFocus Lib "User32"() As Integer
Declare Sub ShowAboutBox Lib CowiLib1.dll (ByVal Handle as Integer, ByVal str As
String)
....
Dim Handle as Integer '* Handle to current MapInfo session
Handle = GetFocus()
Call ShowAboutBox(Handle,"Version 1.0")
....
Delphi DLL function:
function ShowAboutBox(hWnd: THandle; pstr: pchar): boolean; stdcall;
// hWnd : handle to MapInfo session
// pstr : About information transfered from MapInfo
begin
Result := True;
Application.Handle := hWnd;
try
COWIAboutbox := TCOWIAboutbox.Create(Application); // Object is freed by
pressing ok
COWIAboutbox.SetAboutName(pstr);
COWIAboutbox.Caption := 'COWI A/S - Geografisk Information & IT';
//COWIAboutbox.Show; // Non modal
COWIAboutbox.ShowModal;
except
Result := False
end;
end;
This will show the form in MapInfo. The modality is a property on the form as listed
in the code
Mvh. | Regards
Jakob Lanstorp
Senior Consultant
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S
Tel +45 63 11 49 00
Direct +45 63 11 48 62
Fax +45 63 11 49 49
Email [EMAIL PROTECTED]
http://www.cowi.dk
-----Original Message-----
From: digeteca [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 2:40 PM
To: [EMAIL PROTECTED]
Subject: MI - L : Mapinfo Application Window Parent handle
Hello all,
How can i attach non-modal delphi form (in dll) with a mapinfo application
window ?
(in fact, i want to have the same behavior for my non-modal delphi form as
map window for example)
i try to set as parent my mapinfo application window to my delphi form, but
it doesn't work !!!!
Help me !
Thanks,
Stephane,
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 13624