Re:MouseDown handle on the titlebar
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Can anybody help me how to handle mousedown event on the titlebar?
-
Can anybody help me how to handle mousedown event on the titlebar?
Hello, You have to override "WndProc" in your Form. Like this:
const int WM_SYSCOMMAND = 0x112; const int SC_MOUSEDOWN = 0xF012; protected override void WndProc( ref Message m ) { if( m.Msg == WM_SYSCOMMAND ) { if( m.WParam.ToInt32() == SC_MOUSEDOWN ) { //Do your stuff here } } base.WndProc( ref m ); }
Hope it helps! P.S.: Just cause I'm currious, why are you starting your question Subject line with "Re:"?All the best, Martin