sinking buttons

wort0987654321

Registered User.
Local time
Today, 02:45
Joined
Dec 5, 2002
Messages
90
is there any way that i can make the buttons on my form sink down when the mouse is moved over the top of them.
 
No, but you could work around this.

If you use the Box control you can create a box outline and shape it so that it fits the command button. Make the box special effectRaised

On the command's MouseMove event you can change the box's special effect to Sunken and on the detail's MouseMove event you can restore the box's special effect to Raised.
 
Last edited:
Here's a visual of what it would look look:
 

Attachments

  • visual.jpg
    visual.jpg
    8.1 KB · Views: 214
And this was the code I used.

Code:
Private Sub Command0_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Box1.SpecialEffect = 1 Then Box1.SpecialEffect = 2
End Sub

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Box1.SpecialEffect = 2 Then Box1.SpecialEffect = 1
End Sub

It will disable any annoying flicker.
 
This sample will show you how to give the button the focus and depress the button. I am changing the fore color of the button and displaying a label message based on which button has the focus. I am also changing the cursor to the pointing finger by keying a single space in the Hyperlink Address property for each command button.

HTH
 

Attachments

Users who are viewing this thread

Back
Top Bottom