|
-
Aug 12th, 2000, 06:44 PM
#1
Thread Starter
Fanatic Member
I have the DC of some thing i want to print. How do i "blt" it to the printer with out doing this:
Code:
BitBlt frmMain.Picture1.hDC, 0, 0, Screen.Width, Screen.Height, DC, 0, 0, vbSrcCopy
Printer.Print frmMain.Picture1.Picture
Do i have to do this, or can i blt directly to the printer?
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 12th, 2000, 08:01 PM
#2
Frenzied Member
the printerhas an hDC property just like a picture box or a form, (Printer.hDC)
so try something like
Code:
BitBlt Printer.hDC, 0, 0, Screen.Width, Screen.Height, DC, 0, 0, vbSrcCopy
Printer.EndDoc
-
Aug 12th, 2000, 08:02 PM
#3
Thread Starter
Fanatic Member
tried that, didn't work, nothing happend
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 12th, 2000, 08:18 PM
#4
Frenzied Member
did it print out a blank page or just do nothing.
-
Aug 12th, 2000, 08:39 PM
#5
Thread Starter
Fanatic Member
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 12th, 2000, 08:48 PM
#6
Frenzied Member
oh god, I remember, VB won't print out the page unless it thinks there's something on it, if you just use the API then it doesn't register that you've printed to it.
try this
Code:
Printer.Print " "
BitBlt frmMain.Picture1.hDC, 0, 0, Screen.Width, Screen.Height, DC, 0, 0, vbSrcCopy
Printer.Print frmMain.Picture1.Picture
-
Aug 12th, 2000, 08:55 PM
#7
Thread Starter
Fanatic Member
I will try that a little later
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 13th, 2000, 03:59 AM
#8
Fanatic Member
Also try to add a Printer.Newpage. If vb doesn't get that command, it prints everything except the last page.
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
|