Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save an image from the clipboard
Message
 
To
01/10/2008 10:37:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349799
Message ID:
01352074
Views:
34
Just in case anyone can see anything i'm doing wrong. It is failing on the last line, i get the error 'File has been deleted' which shows up at the bottom on the status bar, am running it from VFP8 command window for testing. I though that this might mean that the capture was not working but i can paste into paint at that point. All okay on Vista, perhaps the only thing that works on Vista and not on XP :p
Set Procedure To gpImage Additive
gdip = CreateObject("gpInit")
img = CreateObject("gpImage")
mx = "ghi8"
Declare Long FindWindow in Win32API String ClassName, String WindowName
wnd = FindWindow("IEFrame",null)
img.Capture(wnd)
img.SaveAsJPEG(mx)
~M

>Sorry, I'm out ideas. But my guess is that the HWND value is wrong for some reason.
>
>>My problem is that it works in vista with no problems and did no first off. But on any XP machines it is not working, it either takes an image of the application i am calling it from or it takes an image that is just a black bar
>>~M
>>
>>>No idea, but Vista imposes some problems. I suggest that you check Doug Hennig's blog entries, he has spent a lot of time getting VFP to work with Vista. Here is one URL to start from: http://doughennig.blogspot.com/2007/04/elevating-tasks-in-vista.html
>>>
>>>>Although this works on my machine, Vista, it does not work in XP, there i just get screen shots of the application, it ignores the IE window. any ideas? every line of code is the exact same.
>>>>~M
>>>>
>>>>>Which means that IE's caption will also be the same, I guess? Like when you go to Universal Thread, IE will always show "Universal Thread" in the upper left corner of the browser.
>>>>>
Go raibh maith agat

~M
Previous
Reply
Map
View

Click here to load this message in the networking platform