Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9124657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:37:10+00:00 2026-06-17T06:37:10+00:00

I am working on an exercise to create a custom control. The custom control

  • 0

I am working on an exercise to create a custom control. The custom control is a simple label inheriting Control.

Using the tool tip code below:

m_toolTip = new ToolTip();

protected override void OnMouseMove(MouseEventArgs e) {
    m_toolTip.SetToolTip(this, Text);
    base.OnMouseMove(e);
}

protected override void OnMouseLeave(EventArgs e) {
    m_toolTip.RemoveAll();
    base.OnMouseLeave(e);
}

No configurations are used for the tool tip.

When I mouse over the label (although you can’t see the mouse):
enter image description here

Now, after I have left the control and moused over the second label:
enter image description here

When you hover the mouse over a MS Label, the tool tip will show up and then immediately disappears. How can I better duplicate the behavior that the standard MS label displays?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:37:11+00:00Added an answer on June 17, 2026 at 6:37 am

    I resolved the issue with the following change:

    protected override void OnMouseHover(EventArgs e) {
        var m_position = PointToClient(Control.MousePosition);
        m_toolTip.Show(Text, this, m_position.X + 10, m_position.Y, 20000);
        base.OnMouseHover(e);
    }
    

    I removed the previous OnMouseMove override.

    Additionally, I also tweaked some settings that seem to work for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on building a pretty simple site mainly as an exercise in learning
Trying to learn C++ and working through a simple exercise on arrays. Basically, I've
I am working in LaTeX, and when I create a pdf file (using LaTeX
While working on a simple programming exercise, I produced a while loop (DO loop
I'm working on an exercise that wants me to create a small twitter clone,
I have been working on creating a custom allocator as a fun exercise/practice and
I'm working on an exercise where I have to create a roman to arabic
I am working with a Drupal 6.x system to create exercise / personal training
So I've been working the last exercise of Learn Python the Hard Way and
I'm currently working on a self-teaching exercise in programming in C# to make an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.