TextSelection.ChangeCase-Methode

Ändert die Groß-/Kleinschreibung des markierten Textes.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
Sub ChangeCase ( _
    How As vsCaseOptions _
)
void ChangeCase(
    vsCaseOptions How
)
void ChangeCase(
    [InAttribute] vsCaseOptions How
)
abstract ChangeCase : 
        How:vsCaseOptions -> unit 
function ChangeCase(
    How : vsCaseOptions
)

Parameter

Beispiele

Sub ChangeCaseExample()
   ' Open a document before running this example.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   objSel.StartOfDocument(True)
   objSel.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
   objSel.CharRight(True, 4)
   objSel.ChangeCase(vsCaseOptions.vsCaseOptionsUppercase)
   MsgBox("Turned text uppercase.")
   objSel.CharLeft(False, 1)
   objSel.ChangeCase(vsCaseOptions.vsCaseOptionsLowercase)
   MsgBox("Turned text lowercase.")
End Sub

.NET Framework-Sicherheit

Siehe auch

Referenz

TextSelection Schnittstelle

EnvDTE-Namespace