All of my programs have a screenprint function in them as a way for users to
show me what's wrong and what should be right. I've gone back and forth
several times with different ways to program this, but with most all my
users on WinXP, I have had more problems with this ClipBook thing than I
really care to think about and the current incarnation of my screenprint
function uses API's to get an image of the screen and send that image to the
printer.
Is there a better way? Especially on WinXP? I really hope there is. I am
doubtful but I thought I'd ask the question anyway.
Thanx!
Bryan
Galen Somerville - 25 Feb 2005 23:26 GMT
> All of my programs have a screenprint function in them as a way for users to
> show me what's wrong and what should be right. I've gone back and forth
[quoted text clipped - 9 lines]
> Thanx!
> Bryan
I have a Print.bas module that basically grabs the screen into a picture
box. Then it massages it to fit the printer and prints it. OS doesn't
matter.
I got it from this newsgroup. If nobody chimes in with the real thing, I'll
come back.
Galen
Ken Halter - 26 Feb 2005 00:04 GMT
> Is there a better way? Especially on WinXP? I really hope there is. I
> am
> doubtful but I thought I'd ask the question anyway.
You should be able to grab the parts of this code you need.
Capture and Print the Screen, a Form, or any Window
http://www.thescarms.com/vbasic/capture.asp
If you don't want to bother, here's a dll that's almost identical
(started with same KB article) but there's no source (at this time)
Screen Capture, Print and Save
http://www.vbsight.com/Code.htm
Here's some quicky usage syntax....
'===========
Private Sub Form_Load()
Dim o As clsScreenCapture
Set o = New clsScreenCapture
Call o.CaptureWindow(Me.hWnd)
Call o.PrintStoredImage(Printer, True)
End Sub
'===========

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..
Bryan Dickerson - 28 Feb 2005 15:23 GMT
Thanks. I'll give it a shot.
> > Is there a better way? Especially on WinXP? I really hope there is. I
> > am
[quoted text clipped - 21 lines]
> End Sub
> '===========