Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/02/2007, 17:47
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años
Puntos: 50
Re: Propiedad Moveable

No hay una propiedad directa para hacerlo pero puedes sobreescribir el método WndProc para solucionarlo

Código:
        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);
        }
vb.net
Código:
Protected Overrides Sub WndProc(ByRef m As Message) 
const Integer WM_NCLBUTTONDOWN = 161 
const Integer WM_SYSCOMMAND = 274 
const Integer HTCAPTION = 2 
const Integer SC_MOVE = 61456 
 
If (m.Msg = WM_SYSCOMMAND) &&(m.WParam.ToInt32() = SC_MOVE) Then 
Return 
End If 
 
If (m.Msg = WM_NCLBUTTONDOWN) &&(m.WParam.ToInt32() = HTCAPTION) Then 
Return 
End If 

MyBase.WndProc( m) 
End Sub
sacado de aqui

Salu2
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net