Toolbars are greyed out

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

In form design vb2005 - I know it is going to be something realy silly, but
all I want to do is draw a line on a form... but the Toolbar is greyed out.

How may I activate it ?
 
Rob said:
In form design vb2005 - I know it is going to be something realy silly,
but all I want to do is draw a line on a form... but the Toolbar is greyed
out.

How may I activate it ?

The toolbar you are looking at is most likely the toolbar of VS inbuilt
image editor. It's not available for Windows Forms. Note that the .NET
Framework does not contain a line control. You can, however, draw a line
onto a form by overriding its 'OnPaint' method and drawing the line using
'e.Graphics.DrawLine(...)' there.
 
The toolbar you are looking at is most likely the toolbar of VS inbuilt
image editor. It's not available for Windows Forms. Note that the .NET
Framework does not contain a line control. You can, however, draw a line
onto a form by overriding its 'OnPaint' method and drawing the line using
'e.Graphics.DrawLine(...)' there.

Or for the quick and dirty (and poorer performing) option, just add a
label, remove it's text, set it's backcolor to the desired color, set
autosize to false, and set the desired width and height.

Oh the joys of laziness...

(For the record I use the GDI+ method 99.9% of the time - I'm just
sharing another option)

Thanks,

Seth Rowe
 
Back
Top