disable double click on form caption

  • Thread starter Thread starter tolisss
  • Start date Start date
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?
 
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);
 
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
 
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.
 
Back
Top