WinForms tooltips not showing up

c#, tooltip, user-controls, winforms

Solution

I faced similar issue when my tooltip was not showing up over the RichTextBox once in about 3-5 times it normally should. Even forcing it to show explicitly with toolTip.Show didn't help. Until I changed to the way mentioned by Shell - you have to tell where you want your tooltip to appear:

'Dim pnt As Point
pnt = control.PointToClient(Cursor.Position)
pnt.X += 10 ' Give a little offset
pnt.Y += 10 ' so tooltip will look neat
toolTip.Show(text, control, pnt)

This way my tooltip always appears when and where expected. Good luck!

Problem

I have a WinForms application. Each form and user control sets up its tooltips as follows: ``` // in the control constructor var toolTip = new ToolTip(); this.Disposed += (o, e) => toolTip.Dispose(); toolTip.SetToolTip(this.someButton, "..."); toolTip.SetToolTip(this.someCheckBox, "..."); ... ``` However, the tooltips don't appear when I hover over the controls. Is this an appropriate way to use tooltips? Is there something that could be happening in another part of the application (e. g. listening to some event) that would stop tooltips from working? Note that tooltips on my outer form's toolstrip buttons (which are configured via the button's tooltip property) do work as expected. EDIT: I've observed this more and I've noticed that sometimes the tooltip does show up, it is just extremely "flaky". Basically, sometimes when I mouse over a control it will show up very briefly and then flicker away. I can get it to show manually with .Show() and a long AutoPopDelay, but then it never disappears!

Original source