Partager via


TextSelection.ChangeCase, méthode

Modifie la casse du texte sélectionné.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

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

Paramètres

Exemples

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

Sécurité .NET Framework

Voir aussi

Référence

TextSelection Interface

EnvDTE, espace de noms