Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making a fake titlebar.
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00632439
Message ID:
00632462
Views:
71
This message has been marked as the solution to the initial question of the thread.
Hi Bryan,

You can use the following code to move a form about without the titlebar, however this is VFP 7 only. For it to work in < 7 you will need to get the forms window handle using the _WhToHwnd API function.
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
Michael Henstock
AWS
A fish this fine deserves to be a fish nugget styled chunklet.
- Fry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform