Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Draw line on image

Status
Not open for further replies.

sony2000

Programmer
Dec 7, 2003
34
0
0
HK
Hi,

I try to draw a rectange on a picturebox
image but there is not nothing to be shown
on the image. Does someone help me what is
wrong with my code?

Dim blackPen As New Pen(Color.Black, 3)

Image1 = Image.FromFile(l_strfilename)
PicImage.Width = Image1.PhysicalDimension.Width
PicImage.Height = Image1.PhysicalDimension.Height
PicImage.BorderStyle = BorderStyle.FixedSingle
PicImage.Image = Image1

g = PicImage.CreateGraphics()
g.DrawRectangle(blackPen, 0, 0, 50, 50)
g.Dispose()
-------------------------------
Thanks,
Raymond
 
thread796-859679

this should help


Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top