How can I disable the (X) Close Button?
Also, Why is it that I can still maximize my form after setting maximizeBox to false???
This is making me kind of mad.
Printable View
How can I disable the (X) Close Button?
Also, Why is it that I can still maximize my form after setting maximizeBox to false???
This is making me kind of mad.
Handle CancelEventArgs parameter in Closing event . This way :
VB Code:
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing e.Cancel = True End Sub
How ?Quote:
Why is it that I can still maximize my form after setting maximizeBox to false???
Try it and you will see what I'm talking about.
I'm using VS.Net Pro 2003
If you click around where that button would normally be U will find it. (or not)
If need be I can show you a screen shot.
PS: Thanks!!
When setting the property 'MaximizeBox' of the form to False , this would show it but dimmed . I've tried what you said but nothing happened .
:rolleyes:
I know what is happening now, I’m using fixed tool window for border style (does not show min., max.) but I did not set the min. and max. property to false (did not know you had to do that) besides, I did not even think to do it since the boxes don’t show.
Anyway, any time you are using fixed border style setting and do not disable min. and max. Button U still be able to maximize your App.
I’m glad I found the problem.
It is supposed to do that. Clicking on the title bar of a Windows Application is supposed to maximize and minimize the program.Quote:
Originally posted by Rally2000
If you click around where that button would normally be U will find it. (or not)
I'm sure , you didn't read through the thread . If MaximizedBox is set to false , this , no way to maxmimize the window by the 'max' button nor clicking on the title bar .Quote:
Originally posted by kasracer
It is supposed to do that. Clicking on the title bar of a Windows Application is supposed to maximize and minimize the program.
Yes I know, I was explaining to him why what he did maximized the appQuote:
Originally posted by Pirate
I'm sure , you didn't read through the thread . If MaximizedBox is set to false , this , no way to maxmimize the window by the 'max' button nor clicking on the title bar .
My point was simply this, if it claims to be a fixed type window it should not expand at any time.
but it does, oh well! Next time I know to disable min. and max. button.