Ejemplo n.º 1
0
        protected static void show_tooltip(string html, int width, int height, base_interop for_scripting = null, int ss_hide = 0, bool light = false)
        {
            try {
                if (_tltp != null)
                {
                    hide_tooltip();
                }
                _tltp = new frm_tooltip(html, for_scripting, ss_hide);
                if (light)
                {
                    _tltp.Opacity = .6;
                }
                else
                {
                    _tltp.Opacity = .8;
                }

                Point p = Cursor.Position;
                _tltp.Width  = width;
                _tltp.Height = height;
                _tltp.Top    = p.Y - 5; if (_tltp.Bottom > Screen.PrimaryScreen.Bounds.Bottom)
                {
                    _tltp.Top -= _tltp.Bottom - Screen.PrimaryScreen.Bounds.Bottom;
                }
                _tltp.Left = p.X - 5; if (_tltp.Right > Screen.PrimaryScreen.Bounds.Right)
                {
                    _tltp.Left -= _tltp.Right - Screen.PrimaryScreen.Bounds.Right;
                }
                _tltp.TopMost = true;
                _tltp.Show();
            } catch { }
        }
Ejemplo n.º 2
0
 public static void hide_tooltip()
 {
     try { if (_tltp != null)
           {
               _tltp.Close(); _tltp.Dispose(); _tltp = null;
           }
     } catch { }
 }