By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,292 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,292 IT Pros & Developers. It's quick & easy.

Will VB 2004 fix control transparency issues?

P: n/a
Does anyone know if we will be able to put transparent backgrounds on
UserControls in VB 2004?
Nov 20 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Please explain what you mean by this? A UserControl can be transparent with
..NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Does anyone know if we will be able to put transparent backgrounds on
UserControls in VB 2004?

Nov 20 '05 #2

P: n/a
how so? setting a background to transparent gives you an error
"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Please explain what you mean by this? A UserControl can be transparent with .NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Does anyone know if we will be able to put transparent backgrounds on
UserControls in VB 2004?


Nov 20 '05 #3

P: n/a
Hi,

Add this to the new procedure of your usercontrol to make it support
transparent background.
Me.SetStyle(ControlStyles.SupportsTransparentBackC olor, True)

Ken

-------------------------

"Brian Henry" <[REMOVE-ME]br******@adelphia.net> wrote in message
news:eP*************@tk2msftngp13.phx.gbl...
how so? setting a background to transparent gives you an error
"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Please explain what you mean by this? A UserControl can be transparent

with
.NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Does anyone know if we will be able to put transparent backgrounds on
> UserControls in VB 2004?
>
>



Nov 20 '05 #4

P: n/a
No it can't..

Make a UserControl with a transparent background and a round object. Now add
that control to a form overtop of an already existing control. The
UserControl will make a rectangle covering the control beneath it.

Give it a try!

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Please explain what you mean by this? A UserControl can be transparent with .NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Does anyone know if we will be able to put transparent backgrounds on
UserControls in VB 2004?


Nov 20 '05 #5

P: n/a
Hi,
A control with a transparent background will take the color of its
parent. Make sure you set the transparent background controls parent to the
control you want to see. The controls parent is the form by default.

Ken
------------------
"Noozer" <po********@127.0.0.1> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
No it can't..

Make a UserControl with a transparent background and a round object. Now
add
that control to a form overtop of an already existing control. The
UserControl will make a rectangle covering the control beneath it.

Give it a try!

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Please explain what you mean by this? A UserControl can be transparent

with
.NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Does anyone know if we will be able to put transparent backgrounds on
> UserControls in VB 2004?
>
>



Nov 20 '05 #6

P: n/a
If you want to see/interact with the control beneath the usercontrol, then
make the usercontrol shaped, rather than transparent, by setting its region.

"Noozer" <po********@127.0.0.1> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
No it can't..

Make a UserControl with a transparent background and a round object. Now add that control to a form overtop of an already existing control. The
UserControl will make a rectangle covering the control beneath it.

Give it a try!

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Please explain what you mean by this? A UserControl can be transparent

with
.NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Does anyone know if we will be able to put transparent backgrounds on
UserControls in VB 2004?



Nov 20 '05 #7

P: n/a
.....and as I've stated before... The image is loaded dynamically so there is
no way to know what shape to make the region.

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...
If you want to see/interact with the control beneath the usercontrol, then
make the usercontrol shaped, rather than transparent, by setting its region.
"Noozer" <po********@127.0.0.1> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
No it can't..

Make a UserControl with a transparent background and a round object. Now

add
that control to a form overtop of an already existing control. The
UserControl will make a rectangle covering the control beneath it.

Give it a try!

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Please explain what you mean by this? A UserControl can be transparent
with
.NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Does anyone know if we will be able to put transparent backgrounds

on > UserControls in VB 2004?
>
>



Nov 20 '05 #8

P: n/a
Thanks!

I didn't know this, but it still doesn't help if the control spans across
two objects.

All I want to know is if Microsoft is going to fix this bug in VB2004 or
not. (Yes, it's a bug)

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:e$**************@TK2MSFTNGP12.phx.gbl...
Hi,
A control with a transparent background will take the color of its
parent. Make sure you set the transparent background controls parent to the control you want to see. The controls parent is the form by default.

Ken
------------------
"Noozer" <po********@127.0.0.1> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
No it can't..

Make a UserControl with a transparent background and a round object. Now
add
that control to a form overtop of an already existing control. The
UserControl will make a rectangle covering the control beneath it.

Give it a try!

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Please explain what you mean by this? A UserControl can be transparent

with
.NET 2002

"Noozer" <po********@127.0.0.1> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Does anyone know if we will be able to put transparent backgrounds on
> UserControls in VB 2004?
>
>



Nov 20 '05 #9

P: n/a
whether the image is loaded dynamically or at design time makes no
difference. If it was going to look right on a transparent background then
it quite obviously has transparent pixels. Use the OnPaint() subroutine to
create a region from the non transparent pixels of the image and apply it to
the usercontrol.
"Noozer" <po********@127.0.0.1> wrote in message
news:NP%Gb.829897$pl3.39089@pd7tw3no...
....and as I've stated before... The image is loaded dynamically so there is no way to know what shape to make the region.

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
If you want to see/interact with the control beneath the usercontrol, then
make the usercontrol shaped, rather than transparent, by setting its

region.

"Noozer" <po********@127.0.0.1> wrote in message
news:up**************@TK2MSFTNGP10.phx.gbl...
No it can't..

Make a UserControl with a transparent background and a round object.
Now add
that control to a form overtop of an already existing control. The
UserControl will make a rectangle covering the control beneath it.

Give it a try!

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
> Please explain what you mean by this? A UserControl can be

transparent with
> .NET 2002
>
> "Noozer" <po********@127.0.0.1> wrote in message
> news:%2****************@TK2MSFTNGP10.phx.gbl...
> > Does anyone know if we will be able to put transparent backgrounds on > > UserControls in VB 2004?
> >
> >
>
>



Nov 20 '05 #10

P: n/a

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:eq**************@TK2MSFTNGP10.phx.gbl...
whether the image is loaded dynamically or at design time makes no
difference. If it was going to look right on a transparent background then
it quite obviously has transparent pixels. Use the OnPaint() subroutine to
create a region from the non transparent pixels of the image and apply it to the usercontrol.


Why can't I just set a transparency mask colour the same way I did in VB6?
Nov 20 '05 #11

P: n/a
You are not using VB6.

I would suspect that the thinking was, if the developer/user wishes to see
objects beneath their custom control then they will want to interact with
those objects, so rather than have to pass messages to the objects beneath
they will create shaped controls in order that the other control can receive
the messages directly, thus saving valuable resources and helping to fix one
of the major complaints about VB(VB apps are too slow).

Why do you want a control that is Transparent rather than shaped?
If you just want to be able to set a MaskColor then add this property to
your usercontrol and use that color to remove from the region instead of
Color.Transparent.
"Noozer" <po********@127.0.0.1> wrote in message
news:0MbHb.838300$6C4.169526@pd7tw1no...

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in message news:eq**************@TK2MSFTNGP10.phx.gbl...
whether the image is loaded dynamically or at design time makes no
difference. If it was going to look right on a transparent background then it quite obviously has transparent pixels. Use the OnPaint() subroutine to create a region from the non transparent pixels of the image and apply
it to
the usercontrol.


Why can't I just set a transparency mask colour the same way I did in VB6?

Nov 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.