ComponentOne Preview Classic for WinForms: Preview Classic for WinForms Task-Based Help > Setting the Start Page and Scroll Bar Position

Setting the Start Page and Scroll Bar Position

To set the start page and scroll bar position when a document loads, set the StartPage and AutoScrollPosition properties. Add the following code to the Form_Load event after the EndDoc method:

      Visual Basic

' Navigate to the third page.

Me.C1PrintPreview1.StartPage = 3

 

' Reset the scroll bar position to the beginning of the page.

Me.C1PrintPreview1.C1PreviewPane.AutoScrollPosition = System.Drawing.Point.Empty

      C#

// Navigate to the third page.

this.c1PrintPreview1.StartPage = 3;

 

// Reset the scroll bar position to the beginning of the page.

this.c1PrintPreview1.C1PreviewPane.AutoScrollPosition = System.Drawing.Point.Empty;

This topic illustrates the following:

The document will load to the beginning of the third page.

 


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.