Toolbars

  • Thread starter Thread starter KELVIN TRAN
  • Start date Start date
K

KELVIN TRAN

My Toolbars is disable all the time, how to add a line to System windows
form (I am using VB.NET 2003)?

Thank you very much for all your help.

Kelvin Tran
 
This should help for drawing a line:

Private Sub frmAdmin_Paint(ByVal sender As Object, ByVal e As _
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.DrawLine(Pens.Black, 10, 10, 10, 200)
End Sub

what do you mean with my toolbar is disable? Your toolbox? or the menu bar?

greetz Peter
 
Good Morning Peter Greetz:

Thank you very much for your email. I mean menu bar...
I have no problem on toolbars (add/remove) but got problem when I try to
draw line or any shape by select the icon from menu bar. In VB 6, I can
pick line icon from toolbox and draw anywhere on the design form...
Thanks you very much for your help.
Best regards,

Kelvin Tran
 
Hi Kelvin,

in dot net you cant draw a line or shape just by clicking the icon in a menu
bar (I don't even see it) if you want to draw a line or a shape you have to
draw it yourself, or cheat for example you could use a label with a
borderstyle and width = 1

hth Peter
 
Hello Peter Proost:

Here are the steps to select line icon or other sharpe icons as listed
below.
- From menu, select view, Toolbars, and image editor
- The image editor will diplays on menu bar
Thanks
Kelvin Tran
 
For a simple line, try a Label set to Fixed 3d Width, no text, and height
2px.

Greg
 
Hi Kelvin, as you typed yourself that's the image editor toolbar thus for
editing images, you can't use them on a form.

greetz Peter
 
Hi Greg Burns:

Thank you very much for your email. But your answer is not what I am
looking for...Let me put the question in other ways.

What is "Image editor" use for?
How's to use "Image editor"?

Thank you very much for your help.

Best regards,

Kelvin Tran
 
The Image editor is for editing .ico icon files.

To try it out, add an .ico file to your solution. When you double click on
it, Image Editor will launch.

That line button on the Image Editor Toolbar is used when working with the
Image Editor only.

If you want to draw a line on the form, you will have to use the Label hack,
or use GDI and "draw it".

Greg
 
Hi Greg Burns:

Thank you very much for all your help.

Best regards,
Kelvin Tran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top