Quick Search for:  in language:    
51603,Updated,Added,FitToPage,code,gives,abil
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,014,970. lines
 Jobs: 119. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Tablature Pro
By Michael McMullen on 7/2


Click here to see a screenshot of this code!MSN Password Decryptor
By Muhammad Sufyan Ansari on 7/2

(Screen Shot)

Mp3 Paker
By Michael McMullen on 7/2


Suppress Run Time Script Errors
By Nuclear_1000G on 7/2


Click here to see a screenshot of this code!List Maker
By KBM-00 on 7/1

(Screen Shot)

Web Update Checker
By knormalnight on 7/1


A*Beginners API*
By Michael Nipper on 7/1


source hog v1.1
By Robert Justason on 7/1


Click here to see a screenshot of this code!AdAlert® Spyware/Adware Remover UPDATED
By Intrepid Software on 7/1

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Print-Preview and More

Print
Email
 
winzip icon
Submitted on: 8/1/2002 8:54:13 AM
By: Morgan Haueisen 
Level: Advanced
User Rating: By 101 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 11316 times.
 
 
     Updated: 5-16-03 (Added Fit-To-Page). This code gives you the ability to add print previewing to you application and the tools to allow you to make nice looking printed reports. You can fix the printing options such as paper orientation and preview/screen or allow the user to change them when running the report. Use it to design reports without wasting all that paper. I have tried to make this as simple as possible so you can add it to your existing projects and with only a little effort to change your reports. I have never before asked for votes, but I have put a lot of time into this and would appreciate your feedback (please be kind).

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 14 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
8/1/2002 9:22:08 AM:Rick Strickland
Great Job, I like it alot...Will 
certainly be in my toolbox
Thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/1/2002 9:39:40 AM:John Galanopoulos
Quality work. 5 from me. Keep up.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/1/2002 4:58:01 PM:Badr Almodarra
5 globes
keep up great work
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/1/2002 5:34:19 PM:Daniel Camacho
Nice something lots of people are 
looking for... ***** from me..... Good 
luck...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/1/2002 7:01:40 PM:Turki A. Umairan
Wonderful.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/1/2002 11:25:43 PM:Vic Richardson
First Class!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/2/2002 5:39:43 AM:Jørgen Levesen
Thanks for the posting, this deserves 
to win this month contest. I have a 
question though: Do you plan i the near 
future to incorporate printing of 
pictures as well as text as part of the 
document ?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/2/2002 8:45:41 AM:joyprakash saikia
Hi Morgan,
  Its Great Code and 
Excellent Inovative Approach for 
printing. So here is my 5 globes for 
you.
 I've Gathered some facts on 
it:
1) The Code is Excellent and 
Simplest to understand. Thank you for 
sharing it.
Some Suggestions: 
1)It 
throws an error on While the Printer is 
Changed through the ComboBox on the 
FrmPrinterSetup due to "Printer.Duplex" 
Property.   
2) As we know that 
"Doevents" statment is most 
unpredictable and resource consuming. 
From My point of view, If you can 
reduce the No of "Doevents" (Now it is 
total 10), then we see expected 
behaviour on Compiled Mode.
3)In 
'FontTransparent' of 
'clsMultiPgPreview' , the 'vNewValue' 
is never used for Assigning It.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/2/2002 11:20:44 AM:James W Pyle, III
Very nice job.  
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/2/2002 4:33:45 PM:JF
Very good work, keep on coding...
5 
from me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/2/2002 6:11:42 PM:Ulli
You have a Recursive Call in pPrint. 
Try setting .Orientation = PagePortrait 
in Command2_Click 
But good work 
otherwise, keep it up...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/3/2002 6:54:03 AM:Tahir M. Akram
Nice and great effort. 5 out 5.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/3/2002 10:46:48 AM:Morgan Haueisen
Thanks for the feed back I really do 
appreciate it.  I changed the code to 
fix the recusive call in pPrint.  I did 
not think to prevent the programmer 
from entering a tab location larger 
then the page.  I have also made the 
changes suggested by joyprakash saikia. 
 Thanks again for your assistance.  
Morgan
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/3/2002 10:26:48 PM:R. Watson
Excellent code!! Just one suggestion 
for future enhancement. As of now, it 
prints in bitmap (choppy chars). 
Although OK for preview (it being a 
bitmap) on the actual printing you 
should convert it to a richtext so it 
can be "drawn" as text (sharp, true 
type text!). Otherwise great job!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/4/2002 10:02:25 AM:michael doering
Hello Morgan,
>
I think this is a 
good experiment
and I search a lot of 
months for a 'small' print-preview 
unfortunately
each page is a very big 
bitmap ~2,5 MB,
is this the ultimative 
solution ?
'...
I`m not sure, also I 
have no better suggestion.
I hope 
other people`s have any 
suggestion.
Anyway I voted with 5 
globes.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/5/2002 8:42:01 AM:Morgan Haueisen
I started to write the preview using 
RTF files and Word but I ran into some 
problems.
Since I was not dealing with 
an object such as a printer or picture 
box I could not get a lot of 
information I needed.
For example:
* 
There was no way to find out how long 
the printed text was going to be.
* 
There was no way to position text 
vertically on a page or even know where 
on the page you were
* Did not know 
printable area (page height or 
width).
3. Using RTF Codes became very 
complicated, since there was no way to 
predict how or what combination of 
codes were going to be used.
If 
anyone knows a way to solve these 
problems, I would love to here 
them.
Thanks again for your 
interest,
Morgan Haueisen
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/5/2002 6:33:02 PM:JF
I find your work of an exceptional 
quality.It is very well commented, very 
useful, it leaves the place for 
modification for private use. For your 
good work, and the numerous hours which 
you had to spend there, I wish you the 
price for the month contest!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2002 12:46:54 PM:zeff calilung
cool! its nice.
could you send me a 
tutorial of your (Print-Preview and 
More)program
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/21/2002 7:51:13 AM:Alaeddin Hallak
long awaited... great work
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/1/2002 5:12:02 PM:
Good job, dude!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/6/2002 9:10:45 PM:
Nice work. finally this will help me 
organize my reports. thanks. mabuhay 
and more power
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/30/2002 7:30:23 PM:Danny J.
Personaly, do you want to work with 
me?
Danny J.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/30/2002 8:34:40 PM:
Nice, much cleaner than the one i had 
to write recently (despite all the 
niggles above).
Shall be replacing 
some bits from my shabby effort with 
some bits out of this , much better, 
one... Keep it up ..
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/31/2002 2:19:37 AM:
What is the utility of this ? All page 
are statically created inside the code. 
What about taking a RichTextBox for 
source ? That will be very more useful !
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/1/2002 12:16:38 AM:Ramu
This is one of the very best I've seen 
on PSC, keep up the good work
I'll 
be glad if you could do something on 
the printing after preview, the bmps 
give a bad quality of printing. This 
will be the best ever.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/7/2002 10:10:58 AM:Brian!!
Verry nice code, i have been looking 
for something like this 5 from me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/7/2002 6:58:27 PM:
This code is amazing....
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/20/2002 6:38:38 PM:
Excellent, just the approach that i was 
looking for, prefesionnal quality. Keep 
up the good work
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/24/2003 10:30:11 AM:
Excellent! A very good solution to a 
complex problem. In response to 
others...RTF as far as I know is 
impossible to overlay text on graphics, 
If someone knows how to do that I'd 
like to know. This is a great start to 
a great print engine. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/6/2003 3:10:29 AM:SanjayKattimani
Excellent code!!! Keep it up, God bless 
you :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/6/2003 12:09:17 PM:
Good stuff, keep it up. 5 stars from me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/6/2003 12:11:38 PM:
Excellent code. Keep it up.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/9/2003 3:23:12 AM:Dhaval Faria
really an excellent job.. 5 globes from 
me.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/13/2003 5:08:14 AM:
This is one super piece of coding.
5 
***** from me.
I have seen a lot of 
print preview solutions for VB, but 
this is simply one of the 
best....because you get alle the 
functionality of the build in Printer 
object.
JUST GREAT !!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/30/2003 10:45:52 PM:
After searching and trying various ways 
of performing Print Preview for two 
days, I had a problem getting the 
system up and running.  As it turned 
out, I was trying to make it too 
difficult.  The system works and works 
well.  It provides a set of tools for 
producing almost any kind of report you 
choose to do.  The instructions are 
clear and simple.  The code examples 
are handy and easy to follow.  The 
results are outstanding.  I give the 
system five globes, only because there 
is nothing more that I can give it, 
other than credits in the applications 
that I work on.  Thanks for the good 
work.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/1/2003 10:41:33 AM:
Great, just what i was looking for !
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.