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

TabPage.ToString メソッド

Text プロパティの値を格納している文字列返します

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

使用例使用例

TabPage を持つ TabControl を作成するコード例次に示しますToString メソッドは、tabPage1Text 値を格納している文字列作成しtabPage1ToolTipText プロパティ返します

この例では、System.Drawing 名前空間System.Windows.Forms 名前空間使用します

Imports System.Drawing
Imports System.Windows.Forms

Public Class Form1
    Inherits Form
    Private tabControl1 As TabControl
    Private tabPage1 As TabPage

    Private Sub MyTabs()
        Me.tabControl1 = New TabControl()
        Me.tabPage1 = New TabPage()

        Me.tabControl1.Controls.Add(tabPage1)
        Me.tabControl1.Location = New Point(25,
 25)
        Me.tabControl1.Size = New Size(250,
 250)
        Me.tabControl1.ShowToolTips = True

        Me.tabPage1.Text = "myTabPage1"

        ' Creates a string showing the Text value for tabPage1. 
        ' Then assigns the string to ToolTipText.  
        Me.tabPage1.ToolTipText = tabPage1.ToString()

        Me.ClientSize = New Size(300, 300)
        Me.Controls.Add(tabControl1)
    End Sub

    Public Sub New()
        MyTabs()
    End Sub

    Shared Sub Main()
        Application.Run(New Form1())
    End Sub
End Class
using System.Drawing;
using System.Windows.Forms;

public class Form1 : Form
{
    private TabControl tabControl1;
    private TabPage tabPage1;

    private void MyTabs()
    {
        this.tabControl1 = new TabControl();
        this.tabPage1 = new TabPage();

        this.tabControl1.Controls.Add(tabPage1);
        this.tabControl1.Location = new Point(25,
 25);
        this.tabControl1.Size = new Size(250,
 250);
        this.tabControl1.ShowToolTips = true;

        this.tabPage1.Text = "myTabPage1";

        // Creates a string showing the Text value for tabPage1. 
        // Then assigns the string to ToolTipText.  
        this.tabPage1.ToolTipText = tabPage1.ToString();

        this.ClientSize = new Size(300, 300);
        this.Controls.Add(tabControl1);
    }

    public Form1()
    {
        MyTabs();    
    }

    static void Main() 
    {
        Application.Run(new Form1());
    }
}
using namespace System::Drawing;
using namespace System::Windows::Forms;
public ref class Form1: public
 Form
{
private:
   TabControl^ tabControl1;
   TabPage^ tabPage1;
   void MyTabs()
   {
      this->tabControl1 = gcnew TabControl;
      this->tabPage1 = gcnew TabPage;
      this->tabControl1->Controls->Add( tabPage1 );
      this->tabControl1->Location = Point(25,25);
      this->tabControl1->Size = System::Drawing::Size( 250,
 250 );
      this->tabControl1->ShowToolTips = true;
      this->tabPage1->Text = "myTabPage1";
      
      // Creates a string showing the Text value for tabPage1. 
      // Then assigns the string to ToolTipText.  
      this->tabPage1->ToolTipText = tabPage1->ToString();
      this->ClientSize = System::Drawing::Size( 300, 300 );
      this->Controls->Add( tabControl1 );
   }


public:
   Form1()
   {
      MyTabs();
   }

};

int main()
{
   Application::Run( gcnew Form1 );
}

import System.Drawing.*;
import System.Windows.Forms.*;

public class Form1 extends Form
{
    private TabControl tabControl1;
    private TabPage tabPage1;

    private void MyTabs()
    {
        this.tabControl1 = new TabControl();
        this.tabPage1 = new TabPage();

        this.tabControl1.get_Controls().Add(tabPage1);
        this.tabControl1.set_Location(new Point(25,
 25));
        this.tabControl1.set_Size(new Size(250,
 250));
        this.tabControl1.set_ShowToolTips(true);

        this.tabPage1.set_Text("myTabPage1");
        // Creates a string showing the Text value for tabPage1. 
        // Then assigns the string to ToolTipText.  
        this.tabPage1.set_ToolTipText(tabPage1.ToString());

        this.set_ClientSize(new Size(300, 300));
        this.get_Controls().Add(tabControl1);
    } //MyTabs

    public Form1()
    {
        MyTabs();
    } //Form1

    public static void main(String[]
 args)
    {
        Application.Run(new Form1());
    } //main
} //Form1
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS