Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Printing screen in VB6.0

Question posted by: perro (Newbie) on July 25th, 2008 11:01 AM
I want to print the screen croped from all sides on A4 landscape in Visual Basic 6.0.
When I run this script it should move itself into background, print screen, move picture from clipboard into PictureBox or Image in report, crop it from all sides for specified lenght, stretch and center it across paper A4 landscape and print on default printer.
debasisdas's Avatar
debasisdas
Moderator
6,604 Posts
July 25th, 2008
12:24 PM
#2

Re: Printing screen in VB6.0
what you want is ok ,but what you have tried so far ?

Reply
perro's Avatar
perro
Newbie
2 Posts
July 25th, 2008
12:34 PM
#3

Re: Printing screen in VB6.0
I included "user32" in my project, and with button did on Image1 in Form1:

Form1.Hide
DoEvents
Clipboard.Clear
keybd_event vbKeySnapshot, 0, 0, 0
DoEvents
keybd_event vbKeySnapshot, 0, &H2, 0
DoEvents
Image1.Picture = Clipboard.GetData(vbCFBitmap)
DoEvents
Form1.Show
Me.Refresh

It got me a picture of a screen on my Image1. But how to crop the image, then stretch it and center to A4 landscape in report, and print it?

Reply
Reply
Not the answer you were looking for? Post your question . . .
190,473 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
Top Visual Basic Forum Contributors