TextSelection::PageUp Method (Boolean, Int32)
Visual Studio 2015
Moves the active point a specified number of pages up in the document, scrolling the view.
Assembly: EnvDTE (in EnvDTE.dll)
Parameters
- Extend
-
Type:
System::Boolean
Optional. Determines whether the moved text is collapsed or not. The default is false.
- Count
-
Type:
System::Int32
Optional. Represents the number of pages to move up. The default value is 1.
If the value of Extend is true, then the active end of the text selection is moved up Count number of pages. Otherwise, the text selection is collapsed and positioned Count pages up from the active end. If the beginning of the document is encountered before Count pages, then the position is left at the beginning of the document.
If Count is negative, then PageUp performs like the PageDown method.
Sub PageUpExample() ' Before running this example, open a text document. Dim objSel As TextSelection = DTE.ActiveDocument.Selection ' Go to first line in document and select it. objSel.GotoLine(1, True) objSel.PageDown(True, 2) objSel.PageUp(True, 2) End Sub
Show: