BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

forms disappearing in DLL

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Mon Sep 18, 2006 8:24 pm    Post subject: forms disappearing in DLL Reply with quote



I have an exe that loads a a form A in a DLL. Form A, in turn loads
Form B. None of the forms are modal. So, my users can access Form A and
Form B without having to close any. Now, if they close Form A, for some
reason, Form B disappears. It is still in memory but just disappears.
BringToFront, visible = TRUE, show, nothing works. Any thoughts and
assistance are greatly appreciated.

I am using the following code (simplified, of course):

// in EXE
DLL_LoadFormA( Application.Handle ); // Applcation.Hanlde is the exe's
handle


//in DLL
procedure DLL_LoadFormA( exeHandle: HWnd );
var
frmA : TformA;
begin
if exeHandle = 0 then
exeHandle := GetActiveWindow;
Application.handle := exeHandle; // DLLs appl...handle

//create form A
frmA := TFormA.Create( Application );
frmA.Show;
....
end;


//in formA's code
procedure btnClick( Sender: TObject );
var
frmB: TFormB;
begin
frmB := TFormB.Create( Application );
frmB.Show;
end;


Please help!! Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.