다음을 통해 공유


TextSelection.PageUp(Boolean, Int32) Method

Definition

Moves the active point a specified number of pages up in the document, scrolling the view.

void PageUp(bool Extend = false, int Count = 1);
[System.Runtime.InteropServices.DispId(59)]
public void PageUp (bool Extend = false, int Count = 1);
[<System.Runtime.InteropServices.DispId(59)>]
abstract member PageUp : bool * int -> unit
Public Sub PageUp (Optional Extend As Boolean = false, Optional Count As Integer = 1)

Parameters

Extend
Boolean

Optional. Determines whether the moved text is collapsed or not. The default is false.

Count
Int32

Optional. Represents the number of pages to move up. The default value is 1.

Attributes

Examples

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  

Remarks

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.

Applies to