Solved

Disable double click on title bar of windows form

Posted on 2016-08-17
3
19 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
3 Comments
 
LVL 142

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 32

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now