469,582 Members | 2,170 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,582 developers. It's quick & easy.

Images and drawing stuff. How???

KC
This is a stupid question, but how do you (can you) 'draw' on a form? I just
want to highlight or enhance parts of a form with a line here, a box there,
etc. This was once possible on earlier versions of VB (I recently bought
VB.net, my last one before this was VB4).

I have my image editor toolbar, but everything is greyed out. I know (hope)
this is something simple. MS seems to have made all the little 'simple'
things in VB hard. I understand there's more power, but it's hard after
being away for a few years.

Ken
Nov 20 '05 #1
2 905
"KC" <yo*@dontneed.this> schrieb
This is a stupid question, but how do you (can you) 'draw' on a form?
I just want to highlight or enhance parts of a form with a line here,
a box there, etc. This was once possible on earlier versions of VB (I
recently bought VB.net, my last one before this was VB4).

I have my image editor toolbar, but everything is greyed out. I know
(hope) this is something simple. MS seems to have made all the little
'simple' things in VB hard. I understand there's more power, but it's
hard after being away for a few years.


Simple things have been removed. ;-)

The image editor is for editing images only. On a Form, you can only put
controls. To draw on a control (a Form is a control), override Sub OnPaint
or handle the Paint event:
Private Sub Form1_Paint(ByVal sender As Object, _
ByVal e As System.Windows.Forms.PaintEventArgs) _
Handles MyBase.Paint

e.Graphics.DrawLine(Pens.Red, 0, 0, 50, 50)

End Sub
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
Hi,

Line controls.
http://www.windowsforms.com/TrackVie...26tabindex%3d3

Ken
----------------
"KC" <yo*@dontneed.this> wrote in message
news:%2********************@TK2MSFTNGP11.phx.gbl.. .
This is a stupid question, but how do you (can you) 'draw' on a form? I
just
want to highlight or enhance parts of a form with a line here, a box
there,
etc. This was once possible on earlier versions of VB (I recently bought
VB.net, my last one before this was VB4).

I have my image editor toolbar, but everything is greyed out. I know
(hope)
this is something simple. MS seems to have made all the little 'simple'
things in VB hard. I understand there's more power, but it's hard after
being away for a few years.

Ken

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Vinay | last post: by
reply views Thread by bullshark | last post: by
13 posts views Thread by moondaddy | last post: by
14 posts views Thread by EdB | last post: by
reply views Thread by Marcus Kwok | last post: by
7 posts views Thread by Earl | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.