You don't need Windows API to do this at all. Use the ToolTip class.
public class blah : System.Windows. Forms.Control
{
private System.Windows. Forms.ToolTip toolTip;
protected int _ToolTipInterva l = 3000;
public virtual int ToolTipInterval
{
get { return _ToolTipInterva l; }
set { _ToolTipInterva l = value; }
}
public string ToolTipText
{
get { return "TooTip"; }
}
protected override void OnMouseHover(Ev entArgs e)
{
base.OnMouseHov er(e);
toolTip.Show("Z Index: " + this.ZIndex.ToS tring(),
this, 5, 5, ToolTipInterval );
}
public blah()
{
this.toolTip = new System.Windows. Forms.ToolTip(t his.components) ;
this.toolTip.Au toPopDelay = 5000;
this.toolTip.In itialDelay = 250;
this.toolTip.Re showDelay = 50;
this.toolTip.Sh owAlways = true;
}
}
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"Paul E Collins" <fi************ ******@CL4.org> wrote in message
news:V5******** *************** *******@bt.com. ..
How can I show a tooltip programmaticall y? I want to make it appear over a
particular control at the specific time I choose, and not rely on the
user's mouse movements. I don't mind using some Windows API call for this,
if somebody can explain the parameters.
Eq.