Главная страница | назад





Article #17409: How do I keep my application in a iconized (minimized) state?

 Question and Answer Database
FAQ2409C.txt How do I keep my application in a iconized (minimized) state?
Category :VCL
Platform :All
Product :C++Builder 3.x
Question:
How do I keep my application in a minimized state?
Answer:
First, you must set the WindowState property of the form to
Minimized. Then you must create a message handler to respond to the
Windows WM_QUERYOPEN message, to let Windows know that you do not want
the form to resize.
Example:
Place this code in the private section of the Form declaration:
void virtual __fastcall FixedIconState(TWMQueryOpen& Msg);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_QUERYOPEN,TWMQueryOpen,FixedIconState)
END_MESSAGE_MAP(TForm)
Place this code in the Form implementation:
void __fastcall TForm1::FixedIconState(TWMQueryOpen& Msg)
{
TForm::Dispatch(&Msg);
Msg.Result = 0;
}
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99