TextBoxBase.SelectAll メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TextBoxBase.SelectAll メソッドの意味・解説 

TextBoxBase.SelectAll メソッド

テキスト ボックスすべてのテキスト選択します

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

Dim instance As TextBoxBase

instance.SelectAll
public void SelectAll ()
public:
void SelectAll ()
public void SelectAll ()
解説解説
使用例使用例

派生クラス TextBox使用してコントロールテキスト選択されているかどうか判断するコード例次に示しますテキスト選択されていない場合は、コントロール内容クリップボードコピーする前に SelectAll メソッド呼び出されます。この例では、textBox1 という名前の TextBox作成されている必要があります

Public Sub CopyAllMyText()
    ' Determine if any text is selected in the TextBox control.
    If textBox1.SelectionLength = 0 Then
        ' Select all text in the text box.
        textBox1.SelectAll()
    End If 
    ' Copy the contents of the control to the Clipboard.
    textBox1.Copy()
End Sub

public void CopyAllMyText()
 {
    // Determine if any text is selected in the TextBox control.
    if(textBox1.SelectionLength == 0)
       // Select all text in the text box.
       textBox1.SelectAll();
    
    // Copy the contents of the control to the Clipboard.
    textBox1.Copy();
 }

public:
   void CopyAllMyText()
   {
      // Determine if any text is selected in the TextBox control.
      if ( textBox1->SelectionLength == 0 )
      {
         // Select all text in the text box.
         textBox1->SelectAll();
      }

      // Copy the contents of the control to the Clipboard.
      textBox1->Copy();
   }
public void CopyAllMyText()
{
    // Determine if any text is selected in the TextBox control.
    if (textBox1.get_SelectionLength() == 0) {
        // Select all text in the text box.
        textBox1.SelectAll();
    }
    // Copy the contents of the control to the Clipboard.
    textBox1.Copy();
} //CopyAllMyText
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からTextBoxBase.SelectAll メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTextBoxBase.SelectAll メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTextBoxBase.SelectAll メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

TextBoxBase.SelectAll メソッドのお隣キーワード
検索ランキング

   

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



TextBoxBase.SelectAll メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS