Board index » cppbuilder » Making Multiple Forms Invisible

Making Multiple Forms Invisible

Using BCB 3

    I have this program that when minimized becomes invisible and is "put
into" the SystemTray.  Well this program also when a button is clicked
creates "new" forms that display information.  Anyway...whenever the "new"
forms are there, or at least one is created and on the screen whenever the
main application is minimized it minimizes like normal, no more invisible
form.  I want to know if I can make all of the forms, the main one and all
the "new" forms invisible when the main form is minimized.  When the main is
minimized all the others are minimized with it, but not put into the system
tray.  What i want is when the main is minimized is for just the main to be
minimized into the system tray and the other small "new" forms to be still
active, or minimized and made invisible themselves.  Do I have to have a
vector of "new" forms to keep track of this and when the main form is
minimized do what i want to the entire vector?

Any help would be awesome...

thanks ahead of time

joe "gooboy 99"

 

Re:Making Multiple Forms Invisible


Hi Joe --
[snip]

Quote
> What i want is when the main is minimized is for just the main
> to be minimized into the system tray and the other small "new"
> forms to be still active,

For this, augment the virtual CreateParams() member function of the
"new" Forms, and change the TCreateParams::WndParent data member to NULL
(i.e., the desktop)...

class TForm2 : public TForm
{
// ...
protected:
   virtual void __fastcall CreateParams(TCreateParams& AParams)
   {
      TForm::CreateParams(AParams);
      AParams.WndParent = NULL;
   }
// ...

Quote
};

HTH.

--
Damon Chandler (TeamB)
http://bcbcaq.freeservers.com

Other Threads