469,327 Members | 1,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

this.MaximizeBox (enable/ disable)

Hello.

I have a form with some controls on it. One of these controls is a button
that disables/ enables all the other controls.
The form itself should also be "disabled/enabled", so I set
this.FormBorderStyle = FormBorderStyle.Sizable;
to "enable" and
this.FormBorderStyle = FormBorderStyle.Fixed3D;
to "disable" the form (no resize).

Doing it like this everything is ok. But unfortunately I also want that the
maximize button in the upper right corner to be disabled, so I also set the
MaximizeBox property. And here comes the problem:

Minimizing the form, the taskbar is overlapped - not anymore visible - by my
form when beeing activated again!!!
What can cause such a strange behavior? I am really thankful for any
thoughts and comments.

Greetings and thanks in advance,
Tim.
Nov 16 '05 #1
1 3636
Tim Bücker <ti*************@web.de> wrote:
Minimizing the form, the taskbar is overlapped - not anymore visible - by my
form when beeing activated again!!!
What can cause such a strange behavior? I am really thankful for any
thoughts and comments.


I think I see what you mean -- when I *maximize* the form and /then/
disable the maximize box (actually, the maximize box is now the *restore*
box, because the form is now maximized), the form stays on top of the
taskbar, even though my taskbar is set to stay on top of other windows.
This didn't happen if the form wasn't maximized at the time that
MaximizeBox was set, however.

Is this the problem that you observed?

Also, if I then double-click the form's border (equivalent to clicking an
enabled restore button), the form seems to restore again, and then resize
itself. Once this happens, the form doesn't stay on top of the taskbar
anymore.

I suppose that this is a bug, but I don't think that disabling the restore
button on a maximized form is a good idea at all.
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Derek White | last post: by
1 post views Thread by hortoristic | last post: by
1 post views Thread by Lim Tau Wan (SG) | last post: by
13 posts views Thread by John Salerno | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.