Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving screen to bitmap or jpeg
Message
From
05/03/2008 07:35:39
 
 
To
05/03/2008 05:59:37
Brian O'Donovan
Crescent Computers
Cork, Ireland
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01298821
Message ID:
01298836
Views:
14
>Hi
>
>I am running a signiture capture device called Epad Ink which captures a customer signiture. It does not link into vpf or does not generate a bitmap itself. It can link into VB and work and excell. I was wondering if there was a method of capturing a section of the of or all of if and generating an image from this ?
>
>Thanks
>brian O Donovan

Using GdiPlusX is very simple to capture images, with the advantage that you can do any manipulation if needed, like resizing, saving in any format, reducing quality, saving in Monochrome to save space, etc...

Requires VFP9 and the GdiPlusX library, that can be downloaded from here:
https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=VFPX&ReleaseId=8606
* Initialize GdiPlusX
DO SYSTEM.APP
WITH _Screen.System.Drawing

* Capture the form
LOCAL loBmp as xfcBitmap
loBmp = .Bitmap.FromScreen(Thisform)

* Save the image
loBmp.Save("c:\MyCapturedForm.png", .Imaging.ImageFormat.Png)

* Send to the Printer
loBmp.ToPrinter()

ENDWITH
You can capture anything in a form, like a command button or a container too:
loBmp = .Bitmap.FromScreen(Thisform.Container1)
If you want to use the HWND:
loBmp = .Bitmap.FromScreen(Thisform.HWND)
or
loBmp = .Bitmap.FromScreen(Thisform.MyOLEControl.HWND)
Hope this helps

Cesar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform