Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

VirtualDisplayColumn Property

Visual Studio .NET 2003

Returns the display column of the current position.

[Visual Basic .NET]
Public ReadOnly Property VirtualDisplayColumn() As Integer
[Visual Basic 6]
Property Get VirtualDisplayColumn() As Long
HRESULT __stdcall get_VirtualDisplayColumn(
   /* [out, retval] */ long* retVal
public int VirtualDisplayColumn {get;}
[JScript .NET]
public function get VirtualDisplayColumn() : int


Sub VirtualPointExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   Dim objActive As VirtualPoint = objSel.ActivePoint
   ' Collapse the selection to the beginning of the line.
   ' objActive is "live", tied to the position of the actual selection, 
   ' so it will reflect the new position.
   Dim iCol As Long = objActive.DisplayColumn
   ' Move the selection to the end of the line.

   MsgBox("The length of the insertion point line is " & (objActive.DisplayColumn - iCol) & " display characters.")
   MsgBox("VirtualCharOffset value: " & objActive.VirtualCharOffset & vbCr & "VirtualDisplayColumn value: " & objActive.VirtualDisplayColumn)
End Sub

See Also

Applies To: VirtualPoint Object

© 2015 Microsoft