473,804 Members | 3,509 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 1442
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
30037
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
9837
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
1813
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
7158
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
1537
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
1515
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
9708
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
9588
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
10589
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
9161
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
7625
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
6857
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
5527
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
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2999
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.