469,649 Members | 1,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

disable double click on form caption

Hi

I have a form with minimize,maximize button=false and startup window
state= maximized but when the user double click on the form title bar
caption the form's size changes

How do i prevent that?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
3 5813
tolisss wrote:
Hi

I have a form with minimize,maximize button=false and startup window
state= maximized but when the user double click on the form title bar
caption the form's size changes

How do i prevent that?


Is the goal not to allow them to resize the form at all? If so, set the
border to one of the fixed options such as fixed dialog. Then set the
StartPosition to CenterScreen. Finally in the load set the MinimumSize as
follows:

this.MinimumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width,
Screen.PrimaryScreen.WorkingArea.Height);
--
Tom Porterfield
Nov 17 '05 #2


your approach still allow the form to be change its size even if its a
small change i cannot allow it .

I need a subclassing way i suppose but i cannot find any

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
tolisss wrote:

your approach still allow the form to be change its size even if its a
small change i cannot allow it .

I need a subclassing way i suppose but i cannot find any


Then in load set this.MinimumSize = this.Size. Override OnResize. In your
override set this.WindowState = FormWindowState.Maximized.
--
Tom Porterfield
Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by yair | last post: by
3 posts views Thread by snake_2k | last post: by
3 posts views Thread by Jeff | last post: by
7 posts views Thread by Pam | last post: by
4 posts views Thread by Buddy Ackerman | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.