Export (0) Print
Expand All
Expand Minimize

StartPoint Property (General Extensibility)

Visual Studio .NET 2003

For the TextDocument, TextPane, and TextRange objects, returns the TextPoint object representing the beginning of the text document, or the first displayed character of the pane.

For Code Model objects, returns a TextPoint object that defines the beginning of the code item.

[Visual Basic .NET]
Public ReadOnly Property StartPoint() As TextPoint
[Visual Basic 6]
Property Get StartPoint() As TextPoint
HRESULT __stdcall get_StartPoint(
   /* [out, retval] */ TextPoint** retVal
TextPoint StartPoint {get;}
[JScript .NET]
public function get StartPoint() : TextPoint

Return Value

Returns a TextPoint object.


Sub StartPointExample()
   Dim objTextDoc As TextDocument
   Dim objMovePt As EditPoint
   Dim objEditPt As EditPoint, iCtr As Integer

   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")

   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objEditPt = objTextDoc.StartPoint.CreateEditPoint
   objMovePt = objTextDoc.EndPoint.CreateEditPoint
   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objEditPt.Insert("This is a test." & Chr(13))
   Next iCtr
   ' Move the active point to where the second edit point is
   ' and then insert some text.
End Sub

See Also

Applies To: CodeAttribute Object | CodeClass Object | CodeDelegate Object | CodeElement Object | CodeEnum Object | CodeFunction Object | CodeInterface Object | CodeNameSpace Object | CodeParameter Object | CodeProperty Object | CodeStruct Object | CodeType Object | CodeVariable Object | TextDocument Object | TextPane Object | TextRange Object | VCCodeAttribute Object | VCCodeBase Object | VCCodeClass Object | VCCodeDelegate Object | VCCodeElement Object | VCCodeEnum Object | VCCodeEvent Object | VCCodeFunction Object | VCCodeIDLCoClass Object | VCCodeIDLImport Object | VCCodeIDLImportLib Object | VCCodeIDLLibrary Object | VCCodeImport Object | VCCodeInclude Object | VCCodeInterface Object | VCCodeMacro Object | VCCodeMap Object | VCCodeMapEntry Object | VCCodeNamespace Object | VCCodeParameter Object | VCCodeProperty Object | VCCodeStruct Object | VCCodeTypedef Object | VCCodeUnion Object | VCCodeUsing Object | VCCodeVariable Object | VCFileCodeModel Object

© 2015 Microsoft