>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.
You might look at busing ShellExecute() to print it by saving it to a file and running ShellExecute() agaunst the BMP with the verb "PRINT" rsther than the default "OPEN" action. If you have Dan Appleman's VB Win32 book, there sample code that's close to what you need
>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
>