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
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