C#: Add ToolTip To A PictureBox

While some controls within Visual Studio include a property to have a ToolTip, some do not. Take the case of a PictureBox. Since there is no tooltip property for you to set a tooltip text, you would have to do it programmatically. The ToolTip class is part of the System.Drawing namespace. To add a tooltip to a PictureBox object, simply do this code.

ToolTip tt = new ToolTip();
tt.SetToolTip(pictureBoxObject, "This is a tooltip text");

Donations appreciated. Every little $ helps. Or click Google +1

Related Posts with Thumbnails

4 Responses to “C#: Add ToolTip To A PictureBox”

  1. 1
    ryan Says:

    What a super blog!, great content on intersting subject matter.

  2. 2
    Lavanya Says:

    It works…….
    Thank you

  3. 3
    tech Says:

    @lavanya: you’re welcome

  4. 4
    Declan Says:

    Thanks! Worked a treat.

Leave a Reply

Spam protection by WP Captcha-Free