473,795 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Label Transparancy

Tym
How on earth does one set the background property of a label to
transparant, a la VB6?

I have a label which overlays a picturebox, and I don't want the
horrible grey background - I just want the text over the picturebox.
The text dynamically moves around too.

Effectivly, its a "You are Here" sort of thing, so I'm putting a red
"X" in a label and moving it around.

Is there a control that I can use which has a transparency?
---
Tym

Please do not adjust your brain, there is a fault with reality

Email - Domain is valid - user is not - I'm sure you can work it out though!

However, there is an agressive spam trap here, so you'll get blacklisted until I
white list you. If you've emailed and asked for a reply and not got one - please
post a message in here and I'll re-check the black hole!

A plague of Jonathan Ross a thousand fold on the spammers!!
Nov 21 '05 #1
2 1440
from VS 2003 docs:

-- MaskColor Changes in Visual Basic .
In Visual Basic 6.0, the MaskColor property of a CheckBox, CommandButton, or
OptionButton control was used to define a color that would become
transparent, allowing a background image to show through. In order to use
this property, the Style property had to be set to Graphical, the
UseMaskColor property had to be set to true, and a bitmap had to be assigned
to the Picture property.

In Visual Basic .NET, there is no direct equivalent for the MaskColor
property. You can, however, set transparency on a control using code similar
to the following:

' Assumes a picture has been assigned to the BackgroundImage property.

Dim g As New System.Drawing. Bitmap(Button1. BackGroundImage )
g.MakeTranspare nt(System.Drawi ng.Color.White)
Button1.Backgro undImage = g
Patrick Sullivan, AA-BA, BA-IT

"Tym" <no*****@Ictis. net> wrote in message
news:mq******** *************** *********@4ax.c om...
How on earth does one set the background property of a label to
transparant, a la VB6?

I have a label which overlays a picturebox, and I don't want the
horrible grey background - I just want the text over the picturebox.
The text dynamically moves around too.

Effectivly, its a "You are Here" sort of thing, so I'm putting a red
"X" in a label and moving it around.

Is there a control that I can use which has a transparency?
---
Tym

Please do not adjust your brain, there is a fault with reality

Email - Domain is valid - user is not - I'm sure you can work it out though!
However, there is an agressive spam trap here, so you'll get blacklisted until I white list you. If you've emailed and asked for a reply and not got one - please post a message in here and I'll re-check the black hole!

A plague of Jonathan Ross a thousand fold on the spammers!!

Nov 21 '05 #2
Tym
It is rumoured that on Fri, 5 Aug 2005 09:25:15 -0500, "Patrick
Sullivan" <ps****@eatel.n et> spake word of wisdom thus:
' Assumes a picture has been assigned to the BackgroundImage property.

Dim g As New System.Drawing. Bitmap(Button1. BackGroundImage )
g.MakeTranspar ent(System.Draw ing.Color.White )
Button1.Backgr oundImage = g
Patrick Sullivan, AA-BA, BA-IT


Thanks for that - though I'm afraid I feel I have missed out some
important information...

I am writing for PocketPC2002 - and so the cotrols are not "as normal"

I cannot set a bacground image to a button, and fell I am stuck with
the grey background to my label... ~sigh~

Sorry for missing this important piece of info out of the original
question
---
Tym

Please do not adjust your brain, there is a fault with reality

Email - Domain is valid - user is not - I'm sure you can work it out though!

However, there is an agressive spam trap here, so you'll get blacklisted until I
white list you. If you've emailed and asked for a reply and not got one - please
post a message in here and I'll re-check the black hole!

A plague of Jonathan Ross a thousand fold on the spammers!!
Nov 21 '05 #3

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

Similar topics

4
5371
by: dan glenn | last post by:
(PHP4.3.4, GD2) How can I save a PNG using GD2 and insure that it saves as a palette-based (8-bit, 256-color) single-color transparancy?? Saving this way, I could be sure that an image loaded from a transparent gif could be saved as a png and the png would work in IE versions 5.5 and greater (IE has bug that messes up png transparancies which use full alpha channel). thanks for any help at all, -dg
2
30036
by: Xerxes | last post by:
Hi, can you tell me how I can make a <label> hidden? I have hidden the field after the label: var M_Hide = isNS4?'hide':'hidden'; var M_Show = isNS4?'show':'visible'; ..... <label id="uid">UserID: </label> <input name="UserID" type="text" value="" size="20"> <script language="Javascript1.2" type="text/javascript1.2">
4
9835
by: Keon | last post by:
Hoi Do someone know how i can make the background of a iframe transparancy? I already tried it with filter: Alpha(Opacity=50,); but it also make the text transperancy. do someone know how to do this? greetings Koen
1
1812
by: pnp | last post by:
Hi all, I'm developing a win app in C# and I am drawing by myself the icons that I'm going to use in Corel Draw 11, then turn them to icons by using Axialis and then use them from an imagelist in my app for icons. I use Color.Transparent (imagelist transparent color) for the transparrent areas of the icon. The problem is that I get little white dots that don't belong to the picture of my icon (garbage) at the edges and especially if the...
0
387
by: Tym | last post by:
How on earth does one set the background property of a label to transparant, a la VB6? I have a label which overlays a picturebox, and I don't want the horrible grey background - I just want the text over the picturebox. The text dynamically moves around too. Effectivly, its a "You are Here" sort of thing, so I'm putting a red "X" in a label and moving it around.
1
7156
by: Manoj Mittal | last post by:
I have created the Dynamic control in asp.net c# like for (int i = 1; i <= 5; i++) { Label label = new Label(); label.ID = "Label" + i; label.Text = "Label"+i; form1.Controls.Add(label); }
0
1535
by: Kevin McKinley | last post by:
Below i've put the code for a program that i wrote. I need help on lines 384-403. If you run this program you will notice on the first tab when have it produce an answer the $ is surrounded with {$}. How can i get rid of that? from Tkinter import * class MyApp: def __init__(self, parent): self.myparent = parent
0
1514
by: Guilherme Polo | last post by:
On Wed, Sep 3, 2008 at 8:57 PM, Kevin McKinley <kem1723@yahoo.comwrote: Come on.. "help on lines 384-403", that is not a good way to look for help. You are supposed to post some minimal code that demonstrates the problem. Anyway, this demonstrates what you are getting (independent of python version): import Tkinter
9
8029
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I have a MDI Container Form, with one label control on the Background of this container form. When I now open a child form, this form is behind the label ... and this looks ugly ... :-)) When I set the label with "SendToBack", it completely disapears. I also tried to set the child form like "BringToFront" but this also does not help.
0
9673
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
10443
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
10165
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
10002
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
6783
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
5437
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...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.