Il blog di Luciano Bastianello

(Tutto quello che non c'è non si può rompere)

Home Contact Syndicate this Site (RSS 2.0) Syndicate this Site (Atom) Login
  422 Posts :: 35 Stories :: 1261 Comments :: 297 Trackbacks

News




Certified Professional Navision




Article Categories

Archives

Post Categories

Image Galleries

Faq

Programming

Tools

In rete ho trovato questo tip che consente di bloccare la form e impedire il suo spostamento.

Per l’utilizzo è sufficiente il solo copia/incolla su una classe di tipo “Form”.

 

protected override void WndProc( ref Message m )

{

       const int WM_NCLBUTTONDOWN = 161;

       const int WM_SYSCOMMAND = 274;

       const int HTCAPTION = 2;

       const int SC_MOVE = 61456;

       if ( (m.Msg == WM_SYSCOMMAND) && (m.WParam.ToInt32() == SC_MOVE) )

                return;

       if ( (m.Msg == WM_NCLBUTTONDOWN) && (m.WParam.ToInt32() == HTCAPTION))

                return;

       base.WndProc( ref m );

} 

Per quello che può servire a questo indirizzo si può scaricare un progetto di esempio.

posted on Sunday, February 26, 2006 6:54 PM

Feedback

# re: Form 2/19/2007 2:04 PM Alessandro Del Sole's Blog


# Form 2/19/2007 5:13 PM Alessandro Del Sole's Blog


# #46: VB.NET 1/26/2010 5:03 AM mario.deghetto
#46: VB.NET

Post Feedback

Title:
Name:
Url:
Comments: 
Codice di sicurezza
Protected by FormShield