Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving screen to bitmap or jpeg
Message
De
05/03/2008 07:35:39
 
 
À
05/03/2008 05:59:37
Brian O'Donovan
Crescent Computers
Cork, Irlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01298821
Message ID:
01298836
Vues:
13
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform