Ejemplo n.º 1
0
 public BalloonToolTip()
 {
     // Private members initial values.
     this.max       = 200;
     this.autopop   = 5000;
     this.initial   = 500;
     this.title     = string.Empty;
     this.bgcolor   = Color.FromKnownColor(KnownColor.Info);
     this.fgcolor   = Color.FromKnownColor(KnownColor.InfoText);
     this.tooltexts = new Hashtable();
     this.enabled   = true;
     this.icon      = BalloonIcons.None;
     // Creating the tooltip control.
     this.toolwindow = CreateWindowEx(0, "tooltips_class32", string.Empty,
                                      WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT,
                                      CW_USEDEFAULT, CW_USEDEFAULT, IntPtr.Zero, 0, 0, 0);
     SetWindowPos(this.toolwindow, this.TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
     SendMessage(this.toolwindow, TTM_SETMAXTIPWIDTH, 0, new IntPtr(this.max));
     // Creating the toolinfo structure to be used later.
     this.tf      = new toolinfo();
     this.tf.flag = TTF_SUBCLASS | TTF_TRANSPARENT;
     this.tf.size = Marshal.SizeOf(typeof(toolinfo));
 }
Ejemplo n.º 2
0
 public BalloonToolTip()
 {
     // Private members initial values.
     this.max = 200;
     this.autopop = 5000;
     this.initial = 500;
     this.title = string.Empty;
     this.bgcolor = Color.FromKnownColor(KnownColor.Info);
     this.fgcolor = Color.FromKnownColor(KnownColor.InfoText);
     this.tooltexts = new Hashtable();
     this.enabled = true;
     this.icon = BalloonIcons.None;
     // Creating the tooltip control.
     this.toolwindow = CreateWindowEx(0, "tooltips_class32", string.Empty,
                                      WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT,
                                      CW_USEDEFAULT, CW_USEDEFAULT, IntPtr.Zero, 0, 0, 0);
     SetWindowPos(this.toolwindow, this.TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
     SendMessage(this.toolwindow, TTM_SETMAXTIPWIDTH, 0, new IntPtr(this.max));
     // Creating the toolinfo structure to be used later.
     this.tf = new toolinfo();
     this.tf.flag = TTF_SUBCLASS | TTF_TRANSPARENT;
     this.tf.size = Marshal.SizeOf(typeof (toolinfo));
 }
Ejemplo n.º 3
0
        public BalloonToolTip()
        {
            // Private members initial values.
            max			= 2000;
            autopop		= 5000;
            initial		= 500;
            title		= string.Empty;
            bgcolor		= Color.FromKnownColor(KnownColor.Info);
            fgcolor		= Color.FromKnownColor(KnownColor.InfoText);
            tooltexts	= new System.Collections.Hashtable();
            enabled		= false;
            icon		= BalloonIcons.None;

            // Creating the tooltip control.
            toolwindow = CreateWindowEx(0, "tooltips_class32", string.Empty, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP | TTS_BALLOON, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, IntPtr.Zero, 0, 0, 0);
            SetWindowPos(toolwindow, TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
            SendMessage(toolwindow, TTM_SETMAXTIPWIDTH, 0, new IntPtr(max));

            // Creating the toolinfo structure to be used later.
            tf = new toolinfo();
            tf.flag = TTF_TRACK | TTF_SUBCLASS | TTF_TRANSPARENT | TTF_ABSOLUTE;
            tf.id = toolwindow;
            tf.size = Marshal.SizeOf(tf);
        }