|
-
Jan 7th, 2008, 02:27 AM
#1
Thread Starter
Frenzied Member
Strange Label Behavior
A Form has 3 Labels. I want the 3rd Label to look like a hyperlink (clicking the 3rd Label opens another Form). Since I want the 3rd Label to look like a hyperlink, I have even made the cursor change to a hand & the Label underlined when the mouse is moved over the 3rd Label. The hand cursor resides in a resource file. This is the MouseMove event function of the 3rd Label:
Code:
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Label3.FontUnderline = True
Label3.ForeColor = vbBlue
Label3.MouseIcon = LoadResPicture("Hand", vbResCursor)
Label3.MousePointer = vbCustom
End Sub
Since users can change the back color of the Form on which these 3 Labels reside, I have set the BackStyle property of all the 3 Labels to Transparent (at design time in the Properties window) but what I find is when the mouse is moved over the 3rd Label, the font of the 1st & 2nd Label becomes bold. If I set the BackStyle of the 3rd Label to Opaque, then this problem doesn't arise. The font of the 1st & 2nd Label becomes bold only when the BackStyle of the 3rd Label is set to Transparent & the mouse is moved over the 3rd Label.
How do I overcome this?
Last edited by arpan_de; Jan 7th, 2008 at 02:30 AM.
ARPAN
IF YOU HAVE AN APPLE & I HAVE AN APPLE AND WE EXCHANGE THE APPLES, THEN YOU & I WILL STILL HAVE ONE APPLE BUT IF YOU HAVE AN IDEA & I HAVE AN IDEA AND WE EXCHANGE OUR IDEAS, THEN EACH OF US WILL HAVE TWO IDEAS!
NOTHING IS IMPOSSIBLE IN THIS WORLD.....EVEN THE WORD IMPOSSIBLE SAYS I'M POSSIBLE!
PRACTICE MAKES A MAN PERFECT BUT NOBODY IS PERFECT; SO WHY PRACTICE?
-
Jan 7th, 2008, 04:57 AM
#2
Thread Starter
Frenzied Member
-
Jan 7th, 2008, 06:12 AM
#3
Re: Strange Label Behavior
I have no idea why you have this problem, it shouldn't happen. However may I suggest replacing all three labels (if they are grouped together) with one HyperLabel control instead? To get the transparant background set the Visible property to False and the RenderToContainer property to True.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|