1. Opción enviada por Hugo M. Ranea
PUBLIC goForm
goForm = CREATEOBJECT("MiForm")
goForm.SHOW(1)
RETURN
DEFINE CLASS MiForm AS FORM
AUTOCENTER = .T.
TITLEBAR = 0
ADD OBJECT cmdSalir AS COMMANDBUTTON WITH ;
TOP = 10, LEFT = 10, CAPTION = "Salir", ;
HEIGHT = 25, NAME = "cmdSalir"
FUNCTION LOAD
DECLARE INTEGER ReleaseCapture IN WIN32API
DECLARE INTEGER SendMessage IN WIN32API ;
INTEGER, INTEGER, INTEGER, INTEGER
ENDFUNC
FUNCTION MOUSEDOWN
LPARAMETERS nButton, nShift, nXCoord, nYCoord
LOCAL lnHandle
IF nButton = 1
ReleaseCapture()
SendMessage(THISFORM.HWND, 0x112, 0xF012,0)
ENDIF
ENDFUNC
PROCEDURE cmdSalir.CLICK
THISFORM.RELEASE
ENDPROC
ENDDEFINE
2. Opción enviada por Fernando D. Bozzo
PUBLIC goForm
goForm = CREATEOBJECT("MiForm")
goForm.SHOW(1)
RETURN
DEFINE CLASS MiForm AS FORM
AUTOCENTER = .T.
TITLEBAR = 0
ADD OBJECT cmdSalir AS COMMANDBUTTON WITH ;
TOP = 10, LEFT = 10, CAPTION = "Salir", ;
HEIGHT = 25, NAME = "cmdSalir"
PROCEDURE MOUSEMOVE
LPARAMETERS nButton, nShift, nXCoord, nYCoord
DO WHILE MDOWN()
THISFORM.MOVE(THISFORM.LEFT + MCOL(THISFORM.NAME,3) - nXCoord, ;
THISFORM.TOP + MROW(THISFORM.NAME,3) - nYCoord)
ENDDO
ENDPROC
PROCEDURE cmdSalir.CLICK
THISFORM.RELEASE
ENDPROC
ENDDEFINE
3. Opción enviada por Luis María Guayán
PUBLIC goForm
goForm = CREATEOBJECT("MiForm")
goForm.SHOW(1)
RETURN
DEFINE CLASS MiForm AS FORM
AUTOCENTER = .T.
TITLEBAR = 0
ADD OBJECT cmdSalir AS COMMANDBUTTON WITH ;
TOP = 10, LEFT = 10, CAPTION = "Salir", ;
HEIGHT = 25, NAME = "cmdSalir"
PROCEDURE LOAD
DECLARE LONG SendMessage IN "User32";
LONG HANDLE, LONG wMsg, ;
LONG wParam, LONG LPARAM
ENDPROC
PROCEDURE MOUSEMOVE
LPARAMETERS nButton, nShift, nXCoord, nYCoord
SendMessage(THISFORM.HWND, 0x202, 0, 0)
SendMessage(THISFORM.HWND, 0x112, 0xF012, 0)
ENDPROC
PROCEDURE cmdSalir.CLICK
THISFORM.RELEASE
ENDPROC
ENDDEFINE
No hay comentarios. :
Publicar un comentario
Los comentarios son moderados, por lo que pueden demorar varias horas para su publicación.