Disable (double click) Windows title bar sizing
While developing one of the apps. for demo on a touchscreen device, it came to surprise on the application windows sizing function. I have set the formborderstyle to fixedsingle in hope to disable the application from resize but it seems that it was able to shrink/un-maximize from maximized application. I tried playing around with the values in the window properties but to no avail.
I search around the net and found an interesting code snippet posted on Microsoft community newsgroup (idea originates from the MVP, Herfried K. Wagner):
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Const WM_NCLBUTTONDBLCLK As Int32 = &HA3
If m.Msg = WM_NCLBUTTONDBLCLK Then
Exit Sub
End If
MyBase.WndProc(m)
End Sub
Having that codes in the winforms disabled the window resizing on double clicking of the title bar. Great one!
Keywords:
- windows caption form bar vb net click
- double click title bar in windows 7
- vb net how to disable double click resize
- vb net form double click disable size change
- vb net doubleclick title form
- block maximize double click title bar c#
- vb net disable double click resize
- prevent double click form resize for vs2008
- how to suppress double clicks using vb net
- vb net mousedoubleclick disable
- vb net vs2008 window form disable title bar move
- visual basic 6 disable title bar double click
- win 7 turn off double click maximize
- windows 7 disable maximize on double click -aero
- windows disable double click title bar
Written by admin on May 12th, 2010 with
1 comment.
Read more articles on Knowledge Base and Programming.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article
#1. June 9th, 2011, at 5:51 AM.
Thanks, good code!
I was looking for the same solve.