Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old May 20th, 2006, 12:23 AM
Friend of Wrox
 
Join Date: Dec 2005
Location: CHENNAI, TAMILNADU, India.
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anukagni Send a message via Yahoo to anukagni
Default

Yes exactlly wat u mention mike..

 i need the lable should glow till the from open...
 i tried the above method wat u said but iam not getting correttly..



bye
------------------------
pap...
Reply With Quote
  #12 (permalink)  
Old May 24th, 2006, 04:12 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Are you able to post the code that you are trying to use? That might help us better see what exactly you are trying to do.

Thanks

Mike

Mike
EchoVue.com
Reply With Quote
  #13 (permalink)  
Old May 25th, 2006, 12:17 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Here is some code I was playing around with to get this effect. You create a label, and then set its special effect to Raised, the back style to Normal, and then turn it any color you want. Then type in your button text, center it, and then set the topMargin accordingly on the form's On Current event.

Then on the labels MouseDown and Mouse Up Events you put the following code.


Private Sub Label6_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.SpecialEffect = acEffectSunken
Label6.FontBold = True
End Sub

Private Sub Label6_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.SpecialEffect = acEffectRaised
Label6.FontBold = False
End Sub

If you wanted the font to "glow" on mouse over, you would have to put this in the label's anf form's mouse move events, I think.

Does this help? It allows you to create "buttons" of any color you want.



mmcdonal
Reply With Quote
  #14 (permalink)  
Old May 25th, 2006, 12:18 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I just thought you could also change the font color on MouseDown and MouseUp

MouseDown
Label6.ForeColor = vbRed

MouseUp
Label6.ForeColor = vbBlack

mmcdonal
Reply With Quote
  #15 (permalink)  
Old July 26th, 2006, 06:17 AM
Friend of Wrox
 
Join Date: Dec 2005
Location: CHENNAI, TAMILNADU, India.
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anukagni Send a message via Yahoo to anukagni
Default

I have tried above said but no result thats y iam started new topic

bye
------------------------
pap...
Reply With Quote
  #16 (permalink)  
Old October 17th, 2008, 11:36 AM
Registered User
 
Join Date: Oct 2008
Location: London, , United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi echovue,
I used your code to change the colour of the labels on my form when the mouse is over them. It is great thanks! BUT

The only difference is that my labels are in the Form Header. They are in there because they are labels that run a filter which displays continuous records on the same form. If I put the labels in the Detail section they will display for every record- I don't want this.

The problem is that the Private Sub Form Header_MouseMove will only accept one argument and I have another 6 labels that I need this to work on. e.g. lblResources.ForeColor = 26367, lblEducation.ForeColor = 26367

Code:
Private Sub FormHeader_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblEnabling.ForeColor = 26367
End Sub
I have tried adding & to the end of each line in an attempt to reference all the labels in the one Private Sub but it's not working. Can you help with this? If there is a way to just turn all text in the header the same colour that would also be acceptable but I can't do that either!

thanks
Bronnas -



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiline lable kripa ostwal Visual Basic 2005 Basics 1 April 6th, 2007 06:41 AM
glowing the lable while mouse move anukagni Access 3 July 27th, 2006 12:47 AM
Using "--"while the lable is empty in Report anukagni Access 3 January 20th, 2006 08:21 AM



All times are GMT -4. The time now is 09:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.