Nasıl ayarlanır: Tasarım zamanında Windows Form denetimleri için ToolTips ayarlama

Bir dizeyi kod ToolTip içinde veya Windows Forms Tasarımcısı'nda Visual Studio. Bileşen hakkında daha fazla bilgi ToolTip için bkz. ToolTip

ToolTip'i program aracılığıyla ayarlama

  1. ToolTip'i görüntüecek denetimi ekleyin.

  2. Bileşenin SetToolTip yöntemini ToolTip kullanın.

    ' In this example, Button1 is the control to display the ToolTip.
    ToolTip1.SetToolTip(Button1, "Save changes")
    
    // In this example, button1 is the control to display the ToolTip.
    toolTip1.SetToolTip(button1, "Save changes");
    
    // In this example, button1 is the control to display the ToolTip.
    toolTip1->SetToolTip(button1, "Save changes");
    

Tasarımcıda ToolTip ayarlama

  1. Bu Visual Studio forma ToolTip bir bileşen ekleyin.

  2. ToolTip'i görüntüecek denetimi seçin veya forma ekleyin.

  3. Özellikler penceresindeToolTip1'de ToolTip değerini uygun bir metin dizesi olarak ayarlayın.

ToolTip'i program aracılığıyla kaldırmak için

  1. Bileşenin SetToolTip yöntemini ToolTip kullanın.

    ' In this example, Button1 is the control displaying the ToolTip.
    ToolTip1.SetToolTip(Button1, Nothing)
    
    // In this example, button1 is the control displaying the ToolTip.
    toolTip1.SetToolTip(button1, null);
    
    // In this example, button1 is the control displaying the ToolTip.
    toolTip1->SetToolTip(button1, NULL);
    

Tasarımcıda ToolTip'i kaldırma

  1. Bu Visual Studio ToolTip'i görüntüleyen denetimi seçin.

  2. Özellikler penceresindeToolTip1'de ToolTip'te bulunan metni silin.

Ayrıca bkz.