473,657 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

transparent label over textbox

Hi,
I'd like to put a transparent label over a textbox. I set the label
backcolor to transparent, and set its parent as the textbox. But setting the
textbox as the parent resulted in the label not showing up at all (I changed
the backcolor to a color to see if it would show up). Anyone know what to do?
Thanks!!!
Mel
Feb 2 '06 #1
3 6500
Mel,

Instead of doing this, why not custom paint the textbox?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"melanieab" <me*******@disc ussions.microso ft.com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
Hi,
I'd like to put a transparent label over a textbox. I set the label
backcolor to transparent, and set its parent as the textbox. But setting
the
textbox as the parent resulted in the label not showing up at all (I
changed
the backcolor to a color to see if it would show up). Anyone know what to
do?
Thanks!!!
Mel

Feb 2 '06 #2
What I'm trying to do is:
I have the textbox, and it's set at read-only. But you can still have the
mouse enter and the cursor blink in it. I want it so that the user can't
enter the textbox at all without having to disable it (and change its color).
Also, I've tried replacing the textbox with a label, but the text color
isn't as vibrant as with a textbox (I'm being picky here). I was just hoping
you could set the transparent label's parent to anything, and it would work
just the same as when the parent is a picturebox. In the meantime now, I've
tried the same thing with a textbox (putting a transparent textbox over the
other textbox) and it reacts the same as the label.
Any way to get this textbox so that it's not enterable?
Thanks again!!!
Mel
Feb 2 '06 #3
melanieab schrieb:
What I'm trying to do is:
I have the textbox, and it's set at read-only. But you can still have the
mouse enter and the cursor blink in it. I want it so that the user can't
enter the textbox at all without having to disable it (and change its color).


Maybe this will work for you?

Implement the "Enter"-Event of your TextBox:

private void textBox1_Enter( object sender, EventArgs e)
{
SelectNextContr ol(this, true, true, true, true);
}
Feb 4 '06 #4

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

Similar topics

1
2213
by: larry | last post by:
Does anyone has answers to the following questions on VB.NET 1. Setting a Textbox or Text Label to transparent so that the displayed text will not block the entire background picture 2. Setting more font styles such as 'Outline', 'Shadow', just like those font effects offered by other Windows programs such as Word Thanks --- Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website:...
3
5129
by: SStory | last post by:
Is there no way to make a label or link label transparent in vb.net? This is a real pain on about screens with nice graphics where you want your text backgroup to be transparent. I can drawstring most of it--shouldn't have to. But how to do the linklabel I don't know--other than using the control. Ideas? solutions?
4
2550
by: jcrouse | last post by:
I am using the following code to move a label on a form at runtime: If myMousedown = lblP1JoyRight.Name Then If lblP1JoyRight.BackColor.Equals(Color.Transparent) Then bTransCk = True lblP1JoyRight.BackColor = clrLabelMove
2
7582
by: Dean Slindee | last post by:
It appears that I have two routines that don't play well together! First routine: a form's background is shaded with a gradient color. Second routine: then, the background of all labels on the form are made transparent. What results is the label's backcolor appearing as blocks of 'control' colored background. Setting the label's backcolor to color.transparent does not make it transparent (evidently the text is repainted with a...
2
2058
by: UJ | last post by:
I have a browser object on a form with a label in front of it. I want the label to be transparent so that you can see what's going on in the browser behind it. When I make the label transparent (backcolor = color.transparent) what it shows is the window, not the control behind it. What am I doing wrong? TIA - Jeff
2
10974
by: Martin | last post by:
I've been complaing about the VB2005 Help-Information (or rather the lack of it) before, but when I was looking how to set the backstyle of a label control to "Transparent" I found that the VB2005 documentation has reached an all-time low (please note the part about the z-order): MSDN: In Visual Basic 6.0, the BackStyle property of the Label control determines whether the label had a transparent background. Setting the BackStyle...
3
3187
by: bulwark_jrm | last post by:
I'm trying to duplicate functionality found in a Windows application at one of my clients. Essentially, another programmer was able to arrange a lot of search options into a single dialog box by positioning the descriptive label behind the textbox instead of beside it. When the user enters text, the label disappears and the user types in their information into the textbox. I've figured out how to arrange a label behind the textbox...
3
3961
by: vul | last post by:
I used to use creating headers (label at the top of the screen) for VB6 forms as 2 labels shifted a little bit with different for colors to get a simulation of a shadow. I set BackColor of both labels to Transparent. Everything works fine. I'm trying to use the same approach with VB 2005 windows forms. Although I'm setting labels backcolors to transparent, it is not transparent and the label located behind is not visible. I tried to...
8
2142
by: MikeB | last post by:
Hi, I created a picturebox with a map as an image. I want to make certain areas on the map clickable hotspots and the way I'm trying to do this is to create a transparent label with a different cursor (hand) and then I code the click_event for that label. However, I cannot make the label transparent, even if I choose the Transparent option for the attribute for the background color of the label. Any ideas or suggestions? Thanks
0
8395
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
8310
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
8732
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...
1
8503
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,...
1
6166
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
5632
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
4155
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
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
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.