none
How to make customized tooltip window RRS feed

  • Question

  • I wnat to make customized tooltip window like MS Outlook.

    Can anybody give me some idea or sample code?

    Monday, May 6, 2019 3:41 PM

Answers

  • You can make it OwnerDraw

    (you change its size in OnPopup, you draw in OnDraw)

    • Proposed as answer by tommytwotrain Monday, May 6, 2019 4:35 PM
    • Marked as answer by Jeff0803 Thursday, May 9, 2019 4:23 AM
    Monday, May 6, 2019 4:03 PM
  • Hi Jeff0803,

    Thank you for posting here.

    According to your description, you want to make customized tooltip window like MS Outlook.

    You could try the following code in a windows form application.

    Code:

    private void Form1_Load(object sender, EventArgs e) { System.Windows.Forms.Button trialButton = new Button(); trialButton.Text = "Trial Button"; string toolTipText = "Hello World"; ToolTip toolTip = new ToolTip(); toolTip.ToolTipTitle = "ToolTip Title"; toolTip.UseAnimation = true; toolTip.UseFading = true; toolTip.IsBalloon = true; toolTip.Active = true; toolTip.SetToolTip(trialButton, toolTipText); this.Controls.Add(trialButton); }

    Result:

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, May 9, 2019 4:24 AM
    Tuesday, May 7, 2019 3:15 AM
    Moderator

All replies

  • You can make it OwnerDraw

    (you change its size in OnPopup, you draw in OnDraw)

    • Proposed as answer by tommytwotrain Monday, May 6, 2019 4:35 PM
    • Marked as answer by Jeff0803 Thursday, May 9, 2019 4:23 AM
    Monday, May 6, 2019 4:03 PM
  • Hi Jeff0803,

    Thank you for posting here.

    According to your description, you want to make customized tooltip window like MS Outlook.

    You could try the following code in a windows form application.

    Code:

    private void Form1_Load(object sender, EventArgs e) { System.Windows.Forms.Button trialButton = new Button(); trialButton.Text = "Trial Button"; string toolTipText = "Hello World"; ToolTip toolTip = new ToolTip(); toolTip.ToolTipTitle = "ToolTip Title"; toolTip.UseAnimation = true; toolTip.UseFading = true; toolTip.IsBalloon = true; toolTip.Active = true; toolTip.SetToolTip(trialButton, toolTipText); this.Controls.Add(trialButton); }

    Result:

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, May 9, 2019 4:24 AM
    Tuesday, May 7, 2019 3:15 AM
    Moderator