RichTextBox.CanRedo プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RichTextBox.CanRedo プロパティの意味・解説 

RichTextBox.CanRedo プロパティ

RichTextBox 内で実行されたアクションのうち再適用できるアクションがあるかどうかを示す値を取得します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説
使用例使用例

CanRedo プロパティと RedoActionName プロパティ、および Redo メソッドを使用して、テキストの削除以外の操作に対するやり直し操作を制限する方法を次のコード例に示します。この例では、フォームに RichTextBox コントロールが含まれていて、この例のコードが呼び出される前に RichTextBox 内で何らかの操作が実行され、その操作が元に戻されている必要があります。

Private Sub RedoAllButDeletes()

    ' Determines if a Redo operation can be performed.
    If richTextBox1.CanRedo = True Then
        ' Determines if the redo operation deletes text.
        If richTextBox1.RedoActionName <> "Delete"
 Then
            ' Perform the redo.
            richTextBox1.Redo()
        End If
    End If
End Sub
private void RedoAllButDeletes()
{
    // Determines if a Redo operation can be performed.
    if(richTextBox1.CanRedo == true)
    {
        // Determines if the redo operation deletes text.
        if (richTextBox1.RedoActionName != "Delete")
            // Perform the redo.
            richTextBox1.Redo();
    }
}
private:
   void RedoAllButDeletes()
   {
      // Determines if a Redo operation can be performed.
      if ( richTextBox1->CanRedo == true
 )
      {
         // Determines if the redo operation deletes text.
         if (  !richTextBox1->RedoActionName->Equals( "Delete"
 ) )
         // Perform the redo.
         richTextBox1->Redo();
      }
   }
private void RedoAllButDeletes()
{
    // Determines if a Redo operation can be performed.
    if (richTextBox1.get_CanRedo() == true)
 {
        // Determines if the redo operation deletes text.
        if (!(richTextBox1.get_RedoActionName().Equals("Delete")))
 {
            // Perform the redo.
            richTextBox1.Redo();
        }
    }
} //RedoAllButDeletes
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「RichTextBox.CanRedo プロパティ」の関連用語

RichTextBox.CanRedo プロパティのお隣キーワード

   

英語⇒日本語
日本語⇒英語
   



RichTextBox.CanRedo プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS