473,752 Members | 11,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(C ontrolStyles.Su pportsTranspare ntBackColor, true);
this.BackColor= Color.Transpare nt;
}

}//

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

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

=============== =============
Hayato Iriumi (hi*****@hotmai l.com)
Blog: http://www.vbaspcoder.com
"Daimy" <da***@21cn.com .disscuss> wrote in message
news:e3******** ******@TK2MSFTN GP15.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(C ontrolStyles.Su pportsTranspare ntBackColor, true);
this.BackColor= Color.Transpare nt;
}

}//

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


Nov 16 '05 #2

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

Similar topics

7
31134
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 control on another form. All I want to see is the drawing and I want anything behind the drawing to show through. TransparencyKey and Opacity don't compile.
1
20179
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 I prefer don't insert a background in MyComponent, and using the MyApp one as general background with MyComponent positionned, but I am not able to have MyComponent background transparent.
11
1431
by: Noozer | last post by:
Does anyone know if we will be able to put transparent backgrounds on UserControls in VB 2004?
4
9371
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 written on the glass pane. i need to be able to see the control or form that is underneath the RichTextbox, and at the same time to be able to write and erase text to the RichTextbox. i'm assuming that it is the backcolor that hides what is...
0
1714
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 for the image so that the image in the picture box and button control can be paint transparently ? Currently I'm using Magenta in my image portion which require transparent effect.
5
6181
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 tabs, and the Multiview control to display the content that corresponds to the selected tab. My Menu control needs to be able to switch language from English or French depending on the language chosen by the user.
3
4873
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 background color to transparent. ..... Protected Overrides Sub OnCreateControl()
0
2871
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 you see in Office 2007. I got it working great, and created a few more controls, including a "VistaButton", which is primarily transparent when the cursor does not hover over it. However, when I added a standard Panel in the VistaGroupBox and put my...
6
11024
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 control in C# is to add the so called "Transparent style" to your control ("WS_EX_TRANSPARENT"). There are numerous articles how to achieve this and the method is ALMOST always one and the same: protected override CreateParams CreateParams { get ...
0
9031
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9624
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9429
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9295
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8295
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4738
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3354
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2839
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2243
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.