コード例 #1
0
    private TipRect GetTip(Point p)
    {
        TipRect value = null;

        foreach (TipRect tr in _Tips)
        {
            if (tr.Rect.Contains(p))
            {
                value = tr;
            }
        }
        return(value);
    }
コード例 #2
0
    private void Form1_MouseMove(object sender, MouseEventArgs e)
    {
        TipRect checkTip = GetTip(e.Location);

        if (checkTip == null)
        {
            _LastTip = null;
            _tooltip.Hide(this);
        }
        else
        {
            if (checkTip != _LastTip)
            {
                _LastTip = checkTip;
                _tooltip.Show(checkTip.Text, this, e.Location.X + 10, e.Location.Y + 10, 1000);
            }
        }
    }