disable double click on form caption

T

tolisss

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?
 
T

Tom Porterfield

tolisss said:
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);
 
T

tolisss

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
 
T

Tom Porterfield

tolisss said:
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.
 

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