|
-
Oct 27th, 2000, 10:44 AM
#1
Thread Starter
Fanatic Member
Working with the printer is a pain...
I had an idea to display what I wish to print as a web page in a hidden webbrowswer and the tell that webbrowser to print
webbrowser1.print
but there is not print method
there must be a way!
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Oct 27th, 2000, 11:19 AM
#2
Fanatic Member
Here's a way to do it:
Code:
'to print
WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
That print one will just print whatever is it there right out. If you use OLECMDEXECOPT_PROMPTUSER, you'll get a dialog to change stuff like number of copies and so on.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Oct 27th, 2000, 11:32 AM
#3
Thread Starter
Fanatic Member
thanks this is going to make printing reports etc great!
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Oct 27th, 2000, 11:36 AM
#4
Thread Starter
Fanatic Member
what if the webbrowser is not visible
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Oct 27th, 2000, 11:39 AM
#5
Fanatic Member
Hmm.. I'm not sure about that. I made my own browser with it once, and never tried that possibility. I'm inclined to say it would work, but you'll never know until you try heh heh.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Oct 27th, 2000, 11:44 AM
#6
Thread Starter
Fanatic Member
I just made the browser 1 x 1 and stuck it off the side of the form
one more PROBLEM
what if i don't want it to print the page 1 of 1 and then
file//c: and the date on the page.
I just want the page
[Edited by kurtsimons on 10-27-2000 at 12:48 PM]
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Oct 30th, 2000, 01:47 PM
#7
Fanatic Member
Sorry I didn't reply for a while, but I've been preparing for some grad exams. Anyway, I don't know how you could suppress those things from printing, but I'd be willing to say it could be done. And I tested out the visible thing for myself, and it seemed to work fine (but you probably already know that).
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
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
|