Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Window larger than desktop
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00903943
Message ID:
00903949
Views:
24
Hi Alex,

Try the following code. The MoveWindow works for me (WinXP/VFP6)
LOCAL oForm
oForm = CreateObject("tform")
oForm.Show(1)
* end of main

DEFINE CLASS tform As Form
	Width=500
	Height=300
	Caption="Resizing with MoveWindow API"
	
	ADD OBJECT cmd As CommandButton WITH;
	Left=10, Top=15, Width=80, Height=27, Caption="Resize"
	
PROCEDURE cmd.Click
	DECLARE INTEGER GetFocus IN user32 

	DECLARE INTEGER MoveWindow IN user32;
		INTEGER hWnd, INTEGER X, INTEGER Y,;
		INTEGER nWidth, INTEGER nHeight, INTEGER bRepaint

	= MoveWindow(GetFocus(), 0,0, 1500,1400, 1)
	*= MoveWindow(GetFocus(), -50,-50, 1500,1400, 1)  && works either
ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform