Multi-coloured command buttons

phual

Registered User.
Local time
Today, 09:42
Joined
Jun 20, 2009
Messages
27
I'm aware that command buttons come only in a less than stylish grey, but I've also found a simple alternative of using On Mouse Down/Up events to make a label appear and operate like a button. Problem is, I would swear it worked at the end of last week (when I was prototyping), and isn't working today.

A couple of hours of playing and Googling is getting me nowhere, so any suggestions as to the problem?

Code:
Private Sub Label39_MouseDown()
    Label39.SpecialEffect = 2   'Sunken
End Sub
 
Private Sub Label39_MouseUp()
    Label39.SpecialEffect = 1   'Raised
End Sub

Stuart
 
How fantastically irritatingly stupid! I can't recall what exactly I'd done, but I do know that I had been playing around with it (renaming amongst other things). Turns out that commenting out and recreating sorted the problem, despite it being the same code as I'd tried previously (same as above, but wioth parameters).

Thanks

Stuart
 
What is actually happening is that when you copy and paste code from one control to another, lets say the OnClick event, if you go to the properies of that control and move down to the events you will not see [Event Procedure] even though there is code there. As the previous post suggested there is no association betrween the code and the control. If you then attempt to create an event for the On Click using the build button the code will appear and the association will be made.

David
 
No, that definitely wasn't the problem, though I don't know what was. The [Event Procedure]s were there and code was trying to run, but it was giving errors instead of running.

Anyway, it's fixed now and that's what's important.

Stuart
 

Users who are viewing this thread

Back
Top Bottom