Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving a screen
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00873330
Message ID:
00873366
Views:
34
>Hello,
>
>I'm using the Obj2Bmp class to capture the image of a non-VFP screen. That basically works (Thanks George!), but it always captures the screen on position Left=0 and Top=0.
>
>In the method the Left and Top properties are correct, but in the API call they do not seem to get evaluated. So when I move the screen that should be captured to the upper/left corner on the desktop, the image will be perfect. If the screen is more below or right of that position, the capture will just take a picture of the upper/left corner, but with the correct size of the screen to be captured.
>
>After trying to change the code without success, an acceptable workaround would be to move the screen to be captured to exactly this position. Now comes the question:
>
>How is it possible from within VFP 8 to move another application screen to the Top=0 and Left=0 position?

Christian,

First, you're welcome.

Second, it sounds like part of the problem is the fact that it is a non-VFP window. I think that you might need to add a call to the GetWindowRect() API function. This should return the correct left and top positions for the window. If I recall correctly, there's a call to the function that you can use as an example in the project.

One last note, Obj2Bmp uses bit block transfer of the image on the screen and, therefore, cannot transfer a portion of the window that is not displayed.

I've been playing around with the idea of directly adding the capacity to capture non-VFP windows and their objects, so if I think of anything else, I'll post back.

Thanks for the feedback,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform