Nevermind, I worked out what I need to do. I should be using OnMessage rather than OnIdle for a start.
This is all that is needed to handle non-modal DLL dialog forms. procedure TEngine.ApplicationEventsMessage(var Msg: tagMSG; var Handled: Boolean); begin if not Local and IsDialogMessage(GetParent(Msg.hwnd),Msg) then Handled := True; end; The "Local" boolean is a messy and there is likely to be a much better way to do this. What I do is set Local to true when any local forms get the focus, and to false when leaving focus. This way when a DLL form receives the focus, Local is false and all dialog messages are assumed to be coming from controls on the DLL dialog. GetParent of the control is the dialog window of course. I also need to set Local to true before any modal dialog such as that created with MessageDlg or ShowMessage, which again is messy, but at least it works. If anyone can suggest a better way of detecting if a local window or dialog is active then I would love to know. I've just learnt a lot about windows messages but I still have little clues how to do this. As I see it, the above code should enable tabs and other key messages to be processed for all non-modal DLL Forms. Regards, Ross. ----- Original Message ----- From: "Darren Ferguson" <[EMAIL PROTECTED]> To: "Borland's Delphi Discussion List" <[email protected]> Sent: Tuesday, August 01, 2006 11:38 AM Subject: RE: DLL Forms Hi Ross, No hard and fast answer, but search the archives at www.tamaracka.com for a message by Jacques Venter with the subject "Re: Modeless Forms in DLLs", posted on 1 June 2004 to borland.public.delphi.language.delphi.win32. It may not fix the problem, but it may point you in the right direction as to what is going on. Regards, Darren -- Darren Ferguson Senior Software Engineer Clinical Software Division Medtel Australia Adelaide, South Australia -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ross Levis Sent: Monday, 31 July 2006 11:56 AM To: [email protected] Subject: DLL Forms I'm loading some 3rd party C++ DLL's from my Delphi app. Most of these DLL's have a configuration form. Some blind users have pointed out that the tab and shift+tab key is not working in the DLL forms. The default beep sounds when using the tab key. This is a major problem for blind users who rely on it for navigation. All other keys including the arrow keys appear to work fine. Other applications that load the same DLL's do not have this problem! I'm assuming my app is taking over the tab key even when the DLL form has the focus. What can I do to fix this? Many thanks, Ross. _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

