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:
00903955
Views:
27
Hi Anatoliy and Doyle,

I feel like an idiot. I forgot to specify that the window I'm trying to resize is another windows app (i.e. MSAccess), not a vfp form.

Sorry for the misunderstanding and thank you both for the replies!!!!

Alex


>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
>
Low-carb diet not working? Try the Low-food diet instead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform