Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/11/2010, 11:30
Avatar de DarkWatch
DarkWatch
 
Fecha de Ingreso: marzo-2010
Ubicación: Mexico
Mensajes: 177
Antigüedad: 14 años, 1 mes
Puntos: 2
Respuesta: No mover Form c#

Hola.. Hanstoo
Observa yo tengo este codigo el cual me funciona de maravilla, salvo a que el formulario se ve muy feo cuando llega a los limites del formualrio padre, por eso abri esta pregunta aqui, para ver si se puede cancelar el moviemiento de la forma.

Cita:
if (this.Right > this.Parent.Right - 7)
{
this.Enabled = false;
if (Derecha == 0) Derecha = this.Location.X;
this.Enabled = true;
this.Location = new Point(Derecha, this.Location.Y);
}
else if (this.Left < this.Parent.Left)
{
this.Enabled = false;
if (Izquierda == 0) Izquierda = this.Location.X;
this.Enabled = true;
this.Location = new Point(Izquierda, this.Location.Y);
}
if (this.Location.Y <= 0)
{
this.Enabled = false;
this.Enabled = true;
this.Location = new Point(this.Location.X, 0);
}
else if (this.Location.Y >= 200)
{
this.Enabled = false;
this.Enabled = true;
this.Location = new Point(this.Location.X, 200);
}
Este codigo funciona bien, es parecido al que me pasaste solo que yo deshabilito y habilito el formulario solamente...

Gracias..
__________________
Todos Somos Ignorantes Lo que Ocurre es que no Todos Ignoramos las Mismas Cosas