Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing a screen capture
Message
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Printing a screen capture
Miscellaneous
Thread ID:
00263527
Message ID:
00263527
Views:
53
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
Next
Reply
Map
View

Click here to load this message in the networking platform