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 _ToolTipInterval = 3000;
public virtual int ToolTipInterval
{
get { return _ToolTipInterval; }
set { _ToolTipInterval = value; }
}
public string ToolTipText
{
get { return "TooTip"; }
}
protected override void OnMouseHover(EventArgs e)
{
base.OnMouseHover(e);
toolTip.Show("ZIndex: " + this.ZIndex.ToString(),
this, 5, 5, ToolTipInterval);
}
public blah()
{
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.toolTip.AutoPopDelay = 5000;
this.toolTip.InitialDelay = 250;
this.toolTip.ReshowDelay = 50;
this.toolTip.ShowAlways = 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 programmatically? 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.