Minimize without Maximize

D

David Jackson

Hello,

I have a WinForms app (VS.NET 2005 + SP1) where the FormBorderStyle of the
main form is set to FixedDialog.

I've added a NotifyIcon, so have set the form's MinimizeBox property to
true;

This enables the form's minimize button, obviously, and the NotifyIcon stuff
is working.

However, this also displays the form's maximize button, even though the
form's MaximizeBox property is set to false;

Not a huge problem because even though the maximize box is visible it is not
enabled, but it seems to be confusing some of my users who are asking me why
nothing happens when they click the maximize button.

Is there a way to enable the minimize button without displaying the maximize
button?

Thanks,

DJ
 
M

Mark Rae

AFAIK, it is not possible.

Actually, I'm pretty sure this *is* possible with API / pinvoke...

The following article indicates that a method exists to do exactly this with
Microsoft Access forms by manipulating the window's style bits property.

Registration and subscription is required to see the actual code - I guess
if the OP needs it badly enough, he'll pay up... ;-)
 
M

Matt Lacey


The maximize button toggles between being the maximize button and the
restore button. If you do manage to get rid of the button and then
minimize the form, how will you get it back? (assuming not the main
form, which would minimize to the task bar.)

Also.
Are your users using a theme which doesn't make a disabled item
(grayed out) clear?
If your users are trying to maximize the form, isn't it likely that
they are doing this as they want the form to be bigger? If this is
the case, why not allow the form to be maximized?
 
M

Mark Rae

The maximize button toggles between being the maximize button and the
restore button.

Don't ask me, mate - ask the OP...
If you do manage to get rid of the button and then
minimize the form, how will you get it back? (assuming not the main
form, which would minimize to the task bar.)

Er, presumably by clicking in the task bar...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top