Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving a Form without a TitleBar
Message
De
16/01/2003 12:28:06
 
 
À
16/01/2003 12:21:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00742486
Message ID:
00742495
Vues:
19
>I know there was a post (but I can not remember where or when) about moving a form by clicking and dragging the actual form without a titlebar.
>
>Does anyone remember what the thread number was?
>
>Thanks.

David, I cannot remember the post. But in the meantime here is a sample code (I think from the post) that will show it in action:
LOCAL loForm

loForm = CREATEOBJECT("oForm")
loForm.Show(1)

DEFINE CLASS oForm AS FORM

	nHwnd = 0
	TitleBar = 0

	PROCEDURE INIT()
		DECLARE ReleaseCapture IN "user32"
		DECLARE LONG SendMessage IN "user32" LONG HWND, LONG wMsg, LONG wParam, LONG LPARAM

		IF VERSION(5) < 700
			*-- Need to get the forms window handle
		ELSE
			THIS.nHwnd = THIS.HWnd
		ENDIF
	ENDPROC

	PROCEDURE MOUSEDOWN(nButton, nShift, nXCoord, nYCoord)
		IF nButton = 1
			ReleaseCapture()
			SendMessage(THIS.nHWND, 0x112, 0xF012, 0x0)
		ENDIF
	ENDPROC
ENDDEFINE
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform