Custom Print Preview window for VB5
Posted on 1998-10-01
Create a VB5 form which functions as a custom Print Preview window.
(1) No external 3rd-party software may be involved; use only VB5 internals.
(2) Print Preview window (PPWin) will be called from a custom VB5 app.
(3) Win32 API calls are welcome, if well documented.
(4) User must be able to print PPWin contents with full WYSIWYG results.
(5) PPWin must be able to display bitmap (.BMP) files.
o .BMP file path to be passed to PPWin programmatically.
o Size of .BMP file in PPWin is flexible--will be determined programmatically.
(6) PPWin must be able to accept and display text strings programmatically
These 1-3 line titles will label and describe the .BMP image, and will be determined internally by the developer.
(6) While PPWin is displayed, user must be able to:
o Change portrait/landscape options. PPWin contents change accordingly.
If image is more suited to landscape, then image will expand when "Landscape" is selected. Reverse is true for portrait layouts.
o Submit the data to the printer of his/her choice.
If this can be accomplished with a Form and a PictureBox control, that's fine--but it MUST be WYSIWYG, it MUST reflect what will be produced on the printer. Also, the
ability to scale items in this Print Preview window in ad hoc fashion is crucial.
The answer doesn't have to be a polished procedure. But it does need to be past the conceptual level and down to real code examples.
This is a big question, I know, and I'm giving it all the point I've got. I'll add more as I earn them!