Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MoveWindow help needed
Message
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00451412
Message ID:
00451531
Views:
14
Thanks Larry. The need is to move another application's window and have it "pop up" right in front of the user when he/she clicks a button on a VFP form.

>>I want to show another application window and move it to a specific location on the screen. I know how to show it and bring it forward. However, the only API routine I can find that seems to be appropriate for moving it is MoveWindow, but it requires you to also specify the size of the window. I don't want to change its size. I don't want to have to emulate RECT structs in VFP to get its size. I just want to move the window, size unchanged. How do I do that? Thanks!
>
>I'm unsure what you mean by "application window". Is it a window within your own application? If so, just use the Move method of the form. If not, is it another application you wrote? If so, can you write a method in it to use the MoveWindow API using the inherent Height and Width properties of the form.
>
>If none of these are true then you have to get a Window handle. Then use GetWindowRect to get the rectangle structure. Use the reverse of Num2DWord that is posted in the CreatePolygonRgn API. You can also get the function from Ed Rauh's ClsHeap class. Use this to translate the Left-Top, Bottom-Right coordinates so you can get the Height and Width and use this for either MoveWindow or SetWindowPos.
>
>HTH.
>
>>
>>By the way, regarding the thread about the knothead VB developer who keeps knocking VFP... the longstanding and total lack of intrinsic support for binary structures within VFP is a good reason to knock it, no? It's one of the few I can think of.
Previous
Reply
Map
View

Click here to load this message in the networking platform