P
Paul Schnitter
Update:
My custom control is based on the article
"Creating Visual Basic .NET controls from scratch"
in "Adventures in .NET" on MSDN.
It is designed to be a replacement for the VB6 shape
control.
My control draws a shape (circle, square, rectangle ...)
on the background. If
1.) put a MyShapeControl on the form
2.) make shape1.backcolor = form1.backcolor
3.) make form1.transparencykey = form1.backcolor
4.) put a backgoundimage on the form
You can see right through
the background of my control to whatever is behind the
form. Also click events, dragdrops, etc. are transfered
to whatever is below the form.
That is NOT the same behavior as the stock .NET controls,
contrary to the documentation. If I
1.) put a label control on the form
2.) make label1.backcolor = form1.backcolor
3.) make form1.transparencykey = form1.backcolor
4.) put a backgoundimage on the form
the label control background is not transparent.
I don't understand why they changed the VB6 behavior or
why they think this new behavior is good.
All I want is a shape control who's background is
transparent to the other controls on my form. How do I do
that?
My custom control is based on the article
"Creating Visual Basic .NET controls from scratch"
in "Adventures in .NET" on MSDN.
It is designed to be a replacement for the VB6 shape
control.
My control draws a shape (circle, square, rectangle ...)
on the background. If
1.) put a MyShapeControl on the form
2.) make shape1.backcolor = form1.backcolor
3.) make form1.transparencykey = form1.backcolor
4.) put a backgoundimage on the form
You can see right through
the background of my control to whatever is behind the
form. Also click events, dragdrops, etc. are transfered
to whatever is below the form.
That is NOT the same behavior as the stock .NET controls,
contrary to the documentation. If I
1.) put a label control on the form
2.) make label1.backcolor = form1.backcolor
3.) make form1.transparencykey = form1.backcolor
4.) put a backgoundimage on the form
the label control background is not transparent.
I don't understand why they changed the VB6 behavior or
why they think this new behavior is good.
All I want is a shape control who's background is
transparent to the other controls on my form. How do I do
that?