Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 20th, 2006, 12:23 AM
Friend of Wrox
 
Join Date: Dec 2005
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...
 
Old May 24th, 2006, 04:12 PM
Friend of Wrox
 
Join Date: Oct 2004
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
 
Old May 25th, 2006, 12:17 PM
Friend of Wrox
 
Join Date: Mar 2004
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
 
Old May 25th, 2006, 12:18 PM
Friend of Wrox
 
Join Date: Mar 2004
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
 
Old July 26th, 2006, 06:17 AM
Friend of Wrox
 
Join Date: Dec 2005
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...
 
Old October 17th, 2008, 11:36 AM
Registered User
 
Join Date: Oct 2008
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 -








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





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