Transparent Form And Visible Line Drawn.

  • Thread starter Thread starter Lucile
  • Start date Start date
L

Lucile

Hi All,

I am trying to obtain some sort of a "Model" based on horizontal &
vertical lines (like a frame) drawn on a form or on a PictureBox. For
frames configuration purposes, I created a white background image; and
that works fine. But the "Model" will be used to cut off pieces of a
given image with MS Office. I would therefore like that the lines be
appearent on the image to be cut; but the the underlying control be
transparent (so as not to hide the image!).

I looked for a Transparent property on the form but found nothing; and
visible=False makes the lines disappear as well.

Any idea is welcome!

Cheers.
 
Hi, Lucile,

Have you looked at the "SetStyle" method?

I have used the following within the constructor for setting up a
transparent control.

Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or _
ControlStyles.DoubleBuffer Or _
ControlStyles.SupportsTransparentBackColor Or _
ControlStyles.UserPaint, True)
Me.UpdateStyles()
Me.BackColor = Color.Transparent

Hope that helps a bit.

Cheers,
Randy
 
Back
Top