473,387 Members | 1,791 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,387 software developers and data experts.

Can not make a control transparent. Help!

Can not make a control transparent in XP.

Please help me.

Thanks!

public class Class1 : System.Windows.Forms.CheckBox
{

public Class1()
{
this.Left=50;
this.Top=50;
this.Width=32;
this.Height=32;

this.SetStyle(ControlStyles.SupportsTransparentBac kColor, true);
this.BackColor=Color.Transparent;
}

}//

//FORM
public Form1()
{
Class1 obj=new Class1();
this.Controls.Add(obj);
}

Nov 16 '05 #1
1 1571
Maybe you should make the parent form Transparent? Check Opacity property of
the parent form.

============================
Hayato Iriumi (hi*****@hotmail.com)
Blog: http://www.vbaspcoder.com
"Daimy" <da***@21cn.com.disscuss> wrote in message
news:e3**************@TK2MSFTNGP15.phx.gbl...
Can not make a control transparent in XP.

Please help me.

Thanks!

public class Class1 : System.Windows.Forms.CheckBox
{

public Class1()
{
this.Left=50;
this.Top=50;
this.Width=32;
this.Height=32;

this.SetStyle(ControlStyles.SupportsTransparentBac kColor, true);
this.BackColor=Color.Transparent;
}

}//

//FORM
public Form1()
{
Class1 obj=new Class1();
this.Controls.Add(obj);
}


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chuck | last post by:
I am working in C# 2003. Can anyone tell me how to make a user control transparent. VS help doesn't help. What I want to do is draw on a user control during design time and then place the...
1
by: Efkas | last post by:
My application have some level : 1. MyButton class with Label inheritance 2. MyComponent as User Control loading and positionning some of MyButtons 3. MyApp loading and positionning MyComponent ...
11
by: Noozer | last post by:
Does anyone know if we will be able to put transparent backgrounds on UserControls in VB 2004?
4
by: ray well | last post by:
in my app i need to make a RichTextbox control transparent. i need it to be a like a pane of glass lying on a sheet of paper, where u can see everything on the sheet of paper not covered by text...
0
by: jcvoon | last post by:
Hi: I'm using VS2005, I add my image into project resource file, and my picture box and button control reference the image from the project resource file, what is the default transparent color...
5
by: Brad Isaacs | last post by:
Good morning friends, I am working with ASP.NET 2.0 -- VB code behind I have created tabbed pages using the Menu control with the Multiview control. Using the menu control to display the...
3
by: NickP | last post by:
Hi there, I have a usercontrol that inherits from Windows.Forms.Button. In the OnCreateControl method I set the style of the control so that it supports transparent backcolor and set the...
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...
6
by: HristiyanVasilev | last post by:
Hello there ! I'm developing a Windows appliciation that involves so called "Transparent Controls". As you would probably know, the only ( as far as i know ) way to achieve a fully transparent...
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.