|
-
October 7th, 2001, 03:33 PM
#1
Print Text and Form
I want to print some text and a form on the same sheet. With this code, the text is never printed :
Printer.print "Bhla bhla"
frmPrint.PrintForm
Printer.EndDoc
I could use Printer.PaintPicture, but I don't know how to turn my Form into a Picture...
Anybody could help me ?
-
October 7th, 2001, 04:30 PM
#2
Re: Print Text and Form
have you tried : Form1.PrintForm method?
----------
The @host is everywhere!
----------
-
October 7th, 2001, 04:46 PM
#3
Re: Print Text and Form
Yes... e.g. :
Printer.print "My Title"
Form1.PrintForm
Form1 is Printed but not the text I want to print on the same sheet (Ie.: "My title") ???
-
October 7th, 2001, 05:11 PM
#4
Re: Print Text and Form
Here is my own temporary solution. Actually, it prints the MDI window. I want to print one of the Child windows...
Clipboard.Clear
DoEvents
keybd_event VK_MENU, 0, 0, 0
DoEvents
keybd_event VK_SNAPSHOT, 0, 0, 0
DoEvents
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
DoEvents
Printer.print "My Title"
Printer.print
Printer.PaintPicture Clipboard.GetData(vbCFBitmap), 0, 1500
Printer.EndDoc
PS.: keybd_event is a call to the API (lib user32)
It emulates a "Alt-Print Scrn"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|