Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing a screen capture
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00263527
Message ID:
00268741
Vues:
19
>I have written a "print screen" routine in VB6, but I am having trouble getting the print out to look correct and some finer points of the printing working.
>
>The problems:
>1) I put the caputured screen bitmap onto a form and print it. Is this is the best way to do it? Currently the bitmap is clipped because the form is not big enough, how can I get it stretch/shrink itself into the form.
>2) When I issue the form1.printform command, the printout is send directly to the default printer. I would instead like the Windows print diallog to come up. This would allow the user to set various properties of the print job.
>
>Sub Main()
>    Clipboard.Clear
>    keybd_event vbKeySnapshot, TheScreen, 0&, 0&
>    DoEvents
>    Form1.Picture = Clipboard.GetData()
>    Form1.PrintForm
>    End
>End Sub
>
Evan,
You could use DIBAP32.DLL to do the capture and print. It is included in my ScrnPrnt class in the Visual FoxPro file section (File#94706). If you still want to roll your own, you can look at the source for the DLL and see how it does it.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform