473,729 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Making a UserControl Background Transparent

I went thru the walkthough:"Wal ktrough: Authoring a User Control with Visual
c#".
All is fine except that when I add this control to my form that has a map as
a background, I can't see through the control. The control's BackColor won't
accept Transparent. How do I do this so that the background map shows through?
Nov 17 '05 #1
2 2366
this.SetStyle(C ontrolStyles.Su pportsTranspare ntBackColor,tru e);

this.BackColor = Color.Transpare nt;

Try this!

"FredC" <Fr***@discussi ons.microsoft.c om> wrote in message news:B4******** *************** ***********@mic rosoft.com...
I went thru the walkthough:"Wal ktrough: Authoring a User Control with Visual
c#".
All is fine except that when I add this control to my form that has a map as
a background, I can't see through the control. The control's BackColor won't
accept Transparent. How do I do this so that the background map shows through?

Nov 17 '05 #2
I stumbled on this in another thread.
http://www.bobpowell.net/transcontrols.htm

-- Mark

FredC wrote:
I went thru the walkthough:"Wal ktrough: Authoring a User Control with
Visual c#".
All is fine except that when I add this control to my form that has a
map as a background, I can't see through the control. The control's
BackColor won't accept Transparent. How do I do this so that the
background map shows through?

Nov 17 '05 #3

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

Similar topics

5
11534
by: C. Alexander | last post by:
I'm trying to create a multi-user interactive whiteboard that has the ability to load a 'background' image to draw ontop of. The client/server needs to load a transparent layer for each user that connects. This is so the individual user layers can be cleared. Each layer is painted on by the user it is assigned to, so the layer must respond to mouse events.
14
35556
by: Jeff Gillingham | last post by:
I'm using a stylesheet to place a small 'background image' in the upper left corner of several pages. Is there a simple way of making that image a clickable link? Thanks.
2
1443
by: Tom | last post by:
Hi friends I'm having trouble setting the background color of a user control to transparent ! why is that ? any help appreciated Thanks Tom
2
1821
by: Regnab | last post by:
I've got a YES/NO section of a report I'm making. Depending on certain values, I want to circle either YES or NO. I've got the code working so it'll show or hide the circle, but I can't seem to get the circle (which I drew in Adobe Photoshop because I want the handwriting look) to be transparent (ie show the Yes or the No in the middle of it). I've tried right clicking and setting background to transparent but still no luck. The thing...
2
8310
by: Jaikumar | last post by:
Hi, 1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image. 2) In the UserControl1 i am showing one transparent form (form3) when ever user preseed left mouse button. 3) The form3 has one transparent user control (usercontrol2) that paints circles. That measn the circles will show on top the usercontrol1 image. 4) The form3 border style...
1
20178
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.
5
1511
by: Juan Romero | last post by:
Hey guys, Does anyoone know how to make a control with transparent background? This is what I have so far and it doesn't work: Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True) Me.UpdateStyles() Me.BackColor = Color.Transparent Invalidate()
9
5030
by: RCS | last post by:
I'm working on an ASP.NET webpage that generates an image (and am using VWD 2005 until my copy of VS2005 ships). I have done all the obvious (and not-so-obvious) things to try to give a gif that I am generating, a transparent background. On the newsgroups - everyone points to this MSDN article: How to save a .gif file with a new color table by using Visual C# .NET http://support.microsoft.com/default.aspx?scid=kb;en-us;319061 Even...
2
3755
by: Lee | last post by:
Hi, I have a notify icon and have been trying to make the background color transparent. But do .ico files allow a transparent color? when i select the image for the notify icon it askes for type .ico. now i know i can set a transparent background with png's ect, but can i use tranparent (colors) with an ico? thanks
0
8763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9427
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...
1
9202
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9148
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
8151
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...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2165
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.