Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Minimize main form, not app or other forms


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jul 4, 2017 9:16 AM Last Post By: Clement Doss
Mike Ver Hagen

Posts: 10
Registered: 5/5/01
Minimize main form, not app or other forms  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2017 5:51 AM
In a Delphi XE6 VCL app, the user would like to minimize the main form while leaving all other forms open, so we cannot just minimize the app as would be the default behavior when the user clicks on the minimize button of the app's main form. The current behavior is to minimize the app and see its icon in the taskbar and restoring it works as expected.

I've seen many messages with techniques for other kinds of manipulation of minimization, but not one for this. I've also seen Peter Below recommend against setting the form's WindowState to wsMinimized, but maybe that was only in the context of some other desired result. Just setting the state in OnResize doesn't work because it is called at times other than just when the minimize button is clicked.
Clement Doss

Posts: 76
Registered: 3/26/00
Re: Minimize main form, not app or other forms  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2017 9:16 AM   in response to: Mike Ver Hagen in response to: Mike Ver Hagen
Hi,

Mike Ver Hagen wrote:
In a Delphi XE6 VCL app, the user would like to minimize the main form while leaving all other forms open, so we cannot just minimize the app as would be the default behavior when the user clicks on the minimize button of the app's main form. The current behavior is to minimize the app and see its icon in the taskbar and restoring it works as expected.

I've seen many messages with techniques for other kinds of manipulation of minimization, but not one for this. I've also seen Peter Below recommend against setting the form's WindowState to wsMinimized, but maybe that was only in the context of some other desired result. Just setting the state in OnResize doesn't work because it is called at times other than just when the minimize button is clicked.

I modified a project some time ago to work just the way you describe without fighting against delphi App architecture or Windows messaging system. In my case, creating a new main form with all (and only ) the required components to minimized to the notification area. Upon this form creation, I create the "real" main form that can be minimized without any issue. It's working as expected.

HTH,
Clément
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02