Solved

Disable double click on title bar of windows form

Posted on 2016-08-17
3
32 Views
Last Modified: 2016-08-18
Hello,
How can i disable  double click on title bar of windows form which resizes it to normal.


Cheers
0
Comment
Question by:RIAS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 41759165
you can set the FormBorderStyle to one of the Fixed values:
FixedSingle
Fixed3D
FixedDialog
FixedToolBar

however, this will also block the resizing as such of the form
you may also set
MaximumSize (and MinimumSize)
to still keep resizing, but not allowing the form to maximise

hope this helps
0
 
LVL 34

Accepted Solution

by:
it_saige earned 500 total points
ID: 41759341
If the suggestions from Guy do not suffice, you can also override the windows message processing loop -
Public Class Form1
	Const WM_NCLBUTTONDBLCLK As Integer = &HA3

	Protected Overrides Sub WndProc(ByRef m As Message)
		If m.Msg = WM_NCLBUTTONDBLCLK Then
			m.Result = IntPtr.Zero
			Return
		End If
		MyBase.WndProc(m)
	End Sub
End Class

Open in new window


-saige-
0
 

Author Comment

by:RIAS
ID: 41761223
Thanks Experts!
Thank you Saige Sir!
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question