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 8 2131
Off the top of my head, I would not use controls like that because of the
overhead. I would look into graphic reagions and then during the mouse down
event change the cursor based on if the x y coordinate is within one of the
regions.
=============== =============== ========
David McCarter www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at: www.cafepress.com/vsdntips.20412485
"MikeB" wrote:
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
OK, I'm not the sharpest knife in the drawer, but are you telling me
that causing a continuous interrupt stream generated by Mousedown and
then the program work to map the x,y location to the region of a
hotspot is less work than the isolated event that occurs when the user
clicks on the hotspot?
The way I'm trying to do it seems to be a LOT less coding. All that I'm
having difficulty with is the Transparent attribute for BackColor.
Mike
dotNetDave wrote:
Off the top of my head, I would not use controls like that because of the
overhead. I would look into graphic reagions and then during the mouse down
event change the cursor based on if the x y coordinate is within one of the
regions.
=============== =============== ========
David McCarter www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at: www.cafepress.com/vsdntips.20412485
"MikeB" wrote:
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
MikeB wrote:
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
When you place the label on the PictureBox, the label parented to the
form. If you set the label's parent to the PictureBox, then using a
backcolor of transparent will work.
Chris Dunaway wrote:
MikeB wrote:
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
When you place the label on the PictureBox, the label parented to the
form. If you set the label's parent to the PictureBox, then using a
backcolor of transparent will work.
That must be my problem! Can you please tell me how I change or control
the parentage of the control?
Thanks so much
Mike
MikeB wrote:
That must be my problem! Can you please tell me how I change or control
the parentage of the control?
Just use a line like this:
label1.Parent = PictureBox1
Chris Dunaway wrote:
MikeB wrote:
That must be my problem! Can you please tell me how I change or control
the parentage of the control?
Just use a line like this:
label1.Parent = PictureBox1
Thank you again. That was really helpful.
PS. I'm kinda new to the VB scene
Just a warning, I have seen the transparency of controls not work with some
video cards, that's why I use regions instead.
David
"MikeB" wrote:
OK, I'm not the sharpest knife in the drawer, but are you telling me
that causing a continuous interrupt stream generated by Mousedown and
then the program work to map the x,y location to the region of a
hotspot is less work than the isolated event that occurs when the user
clicks on the hotspot?
The way I'm trying to do it seems to be a LOT less coding. All that I'm
having difficulty with is the Transparent attribute for BackColor.
Mike
dotNetDave wrote:
Off the top of my head, I would not use controls like that because of the
overhead. I would look into graphic reagions and then during the mouse down
event change the cursor based on if the x y coordinate is within one of the
regions.
=============== =============== ========
David McCarter www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at: www.cafepress.com/vsdntips.20412485
"MikeB" wrote:
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
>
>
This is driving me crazy. I could swear I had this to work and since
last night when I try it out in my project, it again fails!
If I have the image on the background of the form, I can create a
transparent label whee the cursor changes.
If I put the image in a picturebox and place the label over it, I get
the blank label overlaying the image. If I then in the load event for
the form code
label.parent = picturebox
Then the label box disappears from the screen and I can't mouse over
it, but I can see the image just fine. Ack! What am I overlooking that
made it stop working since last week?
I've tried Send to back and Bring to front, but that doesn't seem to
have any effect, both from the designer and program-wise.
I've got such an important part of my project hinging on this and I've
kinda misplaced the working sample I had last week, I'm in real
trouble.
dotNetDave wrote:
Just a warning, I have seen the transparency of controls not work with some
video cards, that's why I use regions instead.
David
"MikeB" wrote:
OK, I'm not the sharpest knife in the drawer, but are you telling me
that causing a continuous interrupt stream generated by Mousedown and
then the program work to map the x,y location to the region of a
hotspot is less work than the isolated event that occurs when the user
clicks on the hotspot?
The way I'm trying to do it seems to be a LOT less coding. All that I'm
having difficulty with is the Transparent attribute for BackColor.
Mike
dotNetDave wrote:
Off the top of my head, I would not use controls like that because of the
overhead. I would look into graphic reagions and then during the mouse down
event change the cursor based on if the x y coordinate is within one of the
regions.
=============== =============== ========
David McCarter www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at: www.cafepress.com/vsdntips.20412485
>
>
"MikeB" wrote:
>
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: DS |
last post by:
Anyone know of any downsides of using Transparent Buttons with Labels
behind them?
Thanks
DS
|
by: Steve Barnett |
last post by:
I've got a form on which there is a picture box with a picture in it.
On top of that I place two labels and make their backgrounds transparent.
What I expect to see is the picture showing through behind the labels, but
what I actually get is the background of the labels painted in the
background colour of the form.
Can I have...
|
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?
|
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
|
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...
| |
by: Pascal |
last post by:
Je veux que mes label soit transparent aussi sur mes picturebox alors
j'écris :
i want my labels to be transparent on my pictureboxes so i wrote :
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Label1.Parent = PictureBox1
Label1.BackColor = Color.Transparent
Label2.Parent = PictureBox2...
|
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...
|
by: T Clancey |
last post by:
Hi all.
I've been working on a small and very simple label design app for a few days
now, I've got most of my problems solved, although I'm sure there are some
more just around the corner!
The current issue is trying to get dynamically created labels to be truly
transparent. Setting the color value just doesn't do the job!
I may have...
|
by: FPhoenix |
last post by:
Ive been Developing a program in VB.NET after an extensive break from VB6.
In this application i have an image that gets loaded through a listbox, on this image there are areas on the various images that need to be clickable, very similar to html imagemaps. so after starting the project i was under the assumption that i could still use...
|
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...
|
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. ...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |