Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GDI+ How to save directly to a VFP image
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01521803
Message ID:
01521819
Views:
47
>>I got the following code, with a few mods, from GDI+ samples. (Great stuff by the way)
>>WITH _Screen.System.Drawing
>>  loCaptureBmp = .Bitmap.FromScreen(;
>>    Thisform.HWnd, ;
>>    mLeftOffset, ;
>>    mTopOffset, ;
>>    mWidth, ;
>>    mHeight )
>>
>>   loCaptureBmp.Save("C:\Captured.png", .Imaging.ImageFormat.Png)
>>ENDWITH
>>Is it possible to take the result contained in
.Imaging.ImageFormat.Png
and stuff it directly into a VFP Image Object so I don't have to save to file then read the file? I thought I had done this once but it was some time back.
>>
>> I tried
.imgDummy.PictureVal = .Imaging.ImageFormat.Png
and of course it didn't work. (hey, anythings worth trying once)
>>Anyone got any ideas?
>
>Not sure, but did you try
>
>.imgDummy.PictureVal = loCaptureBMP.getPictureVal()?

Hugo, It Works!! thanks a million.

You don't know how to clear out the value do you? The 2nd time I run the procedure It returns the image from the first run. It did that when I was saving to file also.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform