public void Show (string text, IWin32Window window, Point point, int duration)
{
if (window == null)
throw new ArgumentNullException ("window");
if (duration < 0)
throw new ArgumentOutOfRangeException ("duration", "duration cannot be less than zero");
if (!Active)
return;
timer.Stop ();
Control c = (Control)window;
Point display_point = c.PointToScreen (Point.Empty);
display_point.X += point.X;
display_point.Y += point.Y;
//XplatUI.SetOwner (tooltip_window.Handle, c.TopLevelControl.Handle);
// We need to hide our tooltip if the form loses focus, is closed, or is minimized
HookupFormEvents ((Form)c.TopLevelControl);
tooltip_window.Location = display_point;
tooltip_window.PresentModal ((Control)window, text);
state = TipState.Show;
if (duration > 0) {
timer.Interval = duration;
timer.Start ();
}
}