Wednesday, January 5, 2011

How to keep the app iconized

iconized apps

Q:  How do I keep the form in icon form when I run it?  
1.  You must set WindowState to wsMinimized in the form's properties.

2.  In the private section of the form object's declaration, put:

      PROCEDURE WMQueryOpen(VAR Msg : TWMQueryOpen); message WM_QUERYOPEN;
3.  In the implementation section, put this method:

      PROCEDURE TForm1.WMQueryOpen(VAR Msg : TWMQueryOpen);
        Msg.Result := 0;
That's it! The form will always remain iconic. 

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Kang Iwan K-sev | Thank's for your visit To My Site - Ridwan Mulyana | Cibeureum