Transparent Form And Visible Line Drawn.

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

R. MacDonald

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
 

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

Top