Mover Formulario sin barra de titulo (Solucionado)

319 views
Skip to first unread message

Antonio Meza

unread,
Oct 19, 2014, 4:27:36 PM10/19/14
to publice...@googlegroups.com
Hola a todos!!

Estuve probando muchas formas para mover un formulario sin barra de titulo y me encontré el siguiente código, y de todos los que había usado este trabaja perfecto!!!

Les dejo el link donde lo encontré y el código por si a alguien le sirve.



PUBLIC oform1 oForm1 = NEWOBJECT("form1") oForm1.Show() RETURN DEFINE CLASS form1 AS form Autocenter = .T. Height = 250 Width = 375 TitleBar = 0 Name = "Form1" ADD OBJECT command1 AS commandbutton WITH ; Top = 192, Left = 132, Height = 27, Width = 84, ; Caption = "Exit", Name = "Command1" ADD OBJECT command2 AS commandbutton WITH ; Top = 84, Left = 48, Height = 27, Width = 84, ; Caption = "Command2", SpecialEffect = 2, Name = "Command2" ADD OBJECT command3 AS commandbutton WITH ; Top = 84, Left = 252, Height = 27, Width = 84, ; Caption = "Command3", SpecialEffect = 2, Name = "Command3" PROCEDURE Load DECLARE Long ReleaseCapture IN WIN32API DECLARE Long SendMessage IN WIN32API ; Long HWND, Long wMsg, Long wParam, Long Lparam ENDPROC PROCEDURE MouseDown LPARAMETERS nButton, nShift, nXCoord, nYCoord #DEFINE WM_SYSCOMMAND 0x112 #DEFINE WM_LBUTTONUP 0x202 #DEFINE MOUSE_MOVE 0xf012 IF nButton = 1 && LMB = ReleaseCapture() * Complete left click by sending 'left button up' message = SendMessage(Thisform.HWnd, WM_LBUTTONUP, 0x0, 0x0) * Initiate Window Move = SendMessage(Thisform.HWnd, WM_SYSCOMMAND, MOUSE_MOVE, 0x0) ENDIF ENDPROC PROCEDURE command1.Click Thisform.Release() ENDPROC ENDDEFINE

saludos
Antonio Meza

Luis Maria Guayan

unread,
Oct 19, 2014, 4:57:05 PM10/19/14
to publice...@googlegroups.com
Mas opciones:

-- Mover un formulario sin la barra de título --
http://comunidadvfp.blogspot.com/2006/04/mover-un-formulario-sin-la-barra-de.html

Luis María Guayán
Tucumán, Argentina
_____________________________
http://comunidadvfp.blogspot.com

Douglas Sánchez

unread,
Oct 19, 2014, 5:13:12 PM10/19/14
to publice...@googlegroups.com
Mmmmm dos opciones?  cual será las mas adecuada yo no he tenido necesidad de tener usar un form sin titulo, pero me gustaria saber.

saludes

Dsanchez 
--
Ing. Douglas Sánchez Guillén
      Consultor Informatico
Claro: 505 88495476

Fidel Charny

unread,
Oct 20, 2014, 11:13:46 AM10/20/14
to publice...@googlegroups.com
Yo uso la publicada por Luis María Guayán (creo que es la tercera) en el blog citado por Luis María. De las que he probado es la forma más limpia.
Reply all
Reply to author
Forward
0 new messages