DekGenius.com
[ Team LiB ] Previous Section Next Section

PrintPreviewControlmarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)class

This Control provides standardized print preview facilities to your application. It includes only the body of the print preview, rather than all the buttons and other facilities. For standard print preview you should use the PrintPreviewDialog, but if you have specific, custom requirements, you can embed this object instead and provide your own supporting UI.

To use the control, you should provide a Document to be previewed. You can then decide how many Columns and Rows of pages will be displayed and whether to AutoZoom to fit (if not, you can specify your own Zoom factor). You can also enable or disable high-quality antialiasing with the UseAntiAlias property.

public class PrintPreviewControl : Control {
// Public Constructors
   public PrintPreviewControl();
// Public Instance Properties
   public bool AutoZoom{set; get; }
   public int Columns{set; get; }
   public PrintDocument Document{set; get; }
   public int Rows{set; get; }
   public int StartPage{set; get; }
   public override string Text{set; get; }
// overrides Control
   public bool UseAntiAlias{set; get; }
   public double Zoom{set; get; }
// Protected Instance Properties
   protected override CreateParams CreateParams{get; }
// overrides Control
// Public Instance Methods
   public void InvalidatePreview();
   public override void ResetBackColor();  // overrides Control
   public override void ResetForeColor();  // overrides Control
// Protected Instance Methods
   protected override void OnPaint(PaintEventArgs pevent);  // overrides Control
   protected override void OnResize(EventArgs eventargs);  // overrides Control
   protected virtual void OnStartPageChanged(EventArgs e);
   protected override void WndProc(ref Message m);  // overrides Control
// Events
   public event EventHandler StartPageChanged;
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Control(IOleContro, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, System.ComponentModel.ISynchronizeInvoke, IWin32Window) PrintPreviewControl

Returned By

PrintPreviewDialog.PrintPreviewControl

    [ Team LiB ] Previous Section Next Section