showing a dll form in a panel in main app
Posted on 2004-03-22
My form A will call another TCustomForm from a DLL and place it on a panel in the main program.
But when I do this my dbgrids don't behave like they should. I can't navigate with my up_key and down_key.
I know that if rewrite the code and shows the tcustomform in the dll as showmodal the dbgrids behave perfect.
How can I do this when the form is hooked to the panel in the mainform too?
In Main (where I call the form):
ShowDllIRForm(MainForm.Handle).ParentWindow := MainPanel.Handle;
In DLL (returns the form):
function ShowDllIRForm(hApp: THandle): TCustomForm; stdcall;
Application.Handle := hApp;
if not assigned(IRForm) then
IRForm := TIRForm.Create(Application);
result := IRForm;