-   
-   
-   private 
-     { Private declarations } 
-     procedure PegaAlBorde(var m: TWMWINDOWPOSCHANGED); 
-                         message WM_WINDOWPOSCHANGING; 
-   
- procedure TForm1.PegaAlBorde(var m : TWMWINDOWPOSCHANGED); 
- const  
-      {Sensibility} 
-      Sensibilidad:integer=4; 
- var  
-    Dato:TRect; 
- begin  
-     try 
-       {Aqui si el SystemPar... funciona,  
-                   porque estemos en Win95} 
-       SystemParametersInfo(SPI_GETWORKAREA,0,@Dato,0); 
-       if m.windowpos.x<=(Dato.Left+Sensibilidad)  
-         then m.windowpos.x:=Dato.Left; 
-       if m.windowpos.y<=(Dato.Top+Sensibilidad)  
-         then m.windowpos.y:=Dato.Top; 
-   
-       if (m.windowpos.x+Width)>= (Dato.Right-Sensibilidad) 
-         then m.windowpos.x:=Dato.Right-Width; 
-       if (m.windowpos.y+Height)>= (Dato.Bottom-Sensibilidad) 
-         then m.windowpos.y:=Dato.Bottom-Height; 
-     except 
-       {Aqui si se trata de NT o algo en donde no tire Systempar...} 
-       {Here if is NT and Systempar... don't work...} 
-       if m.windowpos.x<=Sensibilidad then m.windowpos.x:=0; 
-       if m.windowpos.y<=Sensibilidad then m.windowpos.y:=0; 
-       if (m.windowpos.x+Width)>= (Screen.Width-Sensibilidad) 
-         then m.windowpos.x:=Screen.Width-Width; 
-       if (m.windowpos.y+Height)>= (Screen.Height-Sensibilidad) 
-         then m.windowpos.y:=Screen.Height-Height; 
-     end;  
- end;  
-   
-