December 2001
Beginner
976 pages
22h 4m
English
If you have already written code to support printing, then supporting Print Preview is quite simple. Supporting Print Preview involves using the System.Windows.Forms.PrintPreviewDialog class. This class has a Document property that needs to reference the PrintDocument object that is used during the printing process. The PrintPreviewDialog class takes care of everything else for you. All you need to do is show the dialog using the ShowDialog method.
To update the previous example to include Print Preview, a menu item must be created. Here is the updated CreateMenus method that adds the Print Preview menu item:
Protected Sub CreateMenus() Dim mnuFile As MenuItem Dim mnuItem As MenuItem ' create main menu m_menu = New MainMenu() ' ...
Read now
Unlock full access