On May 8, 5:18 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
"Rob" <r...@yahoo.comschrieb:
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.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
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