@@ -15,14 +15,13 @@ class ToolTipForm : Form
1515 {
1616 FormattedText _text ;
1717 Label label ;
18- Label labelDna ;
19- ToolTip tipDna ;
2018 System . ComponentModel . IContainer components ;
2119 Win32Window _owner ;
2220 int _left ;
2321 int _top ;
2422 Brush _textBrush ;
2523 Pen _borderPen ;
24+ private ToolTip tipDna ;
2625 Dictionary < FontStyle , Font > _fonts ;
2726
2827 public ToolTipForm ( IntPtr hwndOwner )
@@ -295,7 +294,6 @@ void InitializeComponent()
295294 {
296295 this . components = new System . ComponentModel . Container ( ) ;
297296 this . label = new System . Windows . Forms . Label ( ) ;
298- this . labelDna = new System . Windows . Forms . Label ( ) ;
299297 this . tipDna = new System . Windows . Forms . ToolTip ( this . components ) ;
300298 this . SuspendLayout ( ) ;
301299 //
@@ -309,15 +307,6 @@ void InitializeComponent()
309307 this . label . TabIndex = 0 ;
310308 this . label . Text = "Some long label text." ;
311309 //
312- // labelDna
313- //
314- this . labelDna . BackColor = System . Drawing . Color . CornflowerBlue ;
315- this . labelDna . Location = new System . Drawing . Point ( 0 , 0 ) ;
316- this . labelDna . Name = "labelDna" ;
317- this . labelDna . Size = new System . Drawing . Size ( 2 , 2 ) ;
318- this . labelDna . TabIndex = 0 ;
319- this . tipDna . SetToolTip ( this . labelDna , "IntelliSense by Excel-DNA" ) ;
320- //
321310 // tipDna
322311 //
323312 this . tipDna . ShowAlways = true ;
@@ -328,12 +317,12 @@ void InitializeComponent()
328317 this . BackColor = System . Drawing . Color . White ;
329318 this . ClientSize = new System . Drawing . Size ( 114 , 20 ) ;
330319 this . ControlBox = false ;
331- this . Controls . Add ( this . labelDna ) ;
332320 this . DoubleBuffered = true ;
333321 this . ForeColor = System . Drawing . Color . DimGray ;
334322 this . FormBorderStyle = System . Windows . Forms . FormBorderStyle . None ;
335323 this . Name = "ToolTipForm" ;
336324 this . ShowInTaskbar = false ;
325+ this . tipDna . SetToolTip ( this , "IntelliSense by Excel-DNA" ) ;
337326 this . ResumeLayout ( false ) ;
338327
339328 }
0 commit comments