469,948 Members | 2,939 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Windows form - no cross

I want to put an icon on a Windows Form top left hand corner but would like
to hide the maximize and close box on the top right hand corner.
Can I do that?
Sep 26 '06 #1
3 2372

Hi,

You can hide the Maximize and Close buttons in Design-time using the
Properties window.

Set ControlBox and MaximizeBox properties to false.

These two properties are grouped under Window Style category.

Cheers
Dips
Alan T wrote:
I want to put an icon on a Windows Form top left hand corner but would like
to hide the maximize and close box on the top right hand corner.
Can I do that?
Sep 26 '06 #2
I have set the ControlBox to false but the icon has also gone.
How do I make the icon appeared?

"Dipankar" <di**********@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>
Hi,

You can hide the Maximize and Close buttons in Design-time using the
Properties window.

Set ControlBox and MaximizeBox properties to false.

These two properties are grouped under Window Style category.

Cheers
Dips
Alan T wrote:
>I want to put an icon on a Windows Form top left hand corner but would
like
to hide the maximize and close box on the top right hand corner.
Can I do that?

Sep 27 '06 #3
Hi,

It is true that making ControlBox property false, will hide the full
control box including the icon.

Now If you want that user cannot close the Form using the Close button,
then there is a workaround.

1. Do not make ControlBox property false. Let it be true.
2. In the Form's FormClosing event, write the following code:
e.Cancel = true; // cancels the Closing event.

Cheers
Dips

Alan T wrote:
I have set the ControlBox to false but the icon has also gone.
How do I make the icon appeared?

"Dipankar" <di**********@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...

Hi,

You can hide the Maximize and Close buttons in Design-time using the
Properties window.

Set ControlBox and MaximizeBox properties to false.

These two properties are grouped under Window Style category.

Cheers
Dips
Alan T wrote:
I want to put an icon on a Windows Form top left hand corner but would
like
to hide the maximize and close box on the top right hand corner.
Can I do that?
Sep 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Skip Montanaro | last post: by
13 posts views Thread by Russell E. Owen | last post: by
1 post views Thread by Codemonkey | last post: by
2 posts views Thread by James CC | last post: by
6 posts views Thread by JW | last post: by
9 posts views Thread by dm3281 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.