>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?
Hello John,
There are several ways ti do that :-D
1 - loCaptureBmp.Save(Thisform.Image1) && Yes, that simple !!!!
2 - Thisform.Image1.PIctureVal= loCaptureBmp.GetPictureValFromHbitmap()
3 - Thisform.Image1.PIctureVal= loCaptureBmp.GetPictureVal(.Imaging.ImageFormat.Bmp)
Are these 3 ways enough ???
Here you can get some more detailed info:
Manipulate images with no disk access with GdiPlusXhttp://weblogs.foxite.com/vfpimaging/archive/2007/11/07/5352.aspxHope this helps you to get started