473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Will VB 2004 fix control transparency issues?

Does anyone know if we will be able to put transparent backgrounds on
UserControls in VB 2004?
Nov 20 '05 #1
11 1397
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
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
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
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
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
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
.....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
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
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

90
by: Mark Hahn | last post by:
"Michael Geary" <Mike@Geary.com> wrote ... >Does anyone have some sample code where obj$func() would be used? > (Apologies if I missed it.) There have been so many messages about delegation...
20
by: Nathan Sokalski | last post by:
I am trying to create graphics with GDI+ that include transparency. However, the transparency never seems to show up, even though my colors have an alpha value of 0. How can I generate a graphic...
1
by: jojo | last post by:
I' d like to develop an active x UserControl, using VB6, with transparent background. The user control will contains an image control. When load GIF image with transparent parts I want that parts ...
5
by: vBOT | last post by:
Hi all, I have an odd shaped graphic I would like to use as my interface (see it here at http://www.mokee.com/vbot/ver3/face.jpg) The part I want to be transparent on the image is red. I set the...
2
by: Simon Tamman {Uchiha Jax} | last post by:
I understand that MS made their controls annoyingly difficult to modify (for example transparency on a listbox, tab control, treeview etc) to ensure they didn't torpedo the third party control...
6
by: tommaso.gastaldi | last post by:
In a previous post I have been asking about a way to test Alpha Transparency. Bob and Michael have kindly provided some ideas. Here I would like to share the function I have prepared, for the...
4
by: Adam Clauss | last post by:
I have a completely user-drawn user control in which I enabled transparency (follownig suggestions at...
1
by: dragze | last post by:
Hi, On one of the pages of my site i use two javascripts, one makes transparency of png's work in IE, and the other embeds a flash player. Now use one of the scripts it works fine, use both and...
0
by: MasterOfTheDark | last post by:
This one's a hairy one to explain. What I've got is a class called "VistaGroupBox" that I put some nice-looking Vista-style gradients in the background and made to look like the ribbon categories...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.