button background colour on mouse enter event

Category: Latest Topics    |    1 views
I trying to create some, what i thought, simple rollover buttons. everything works fine except that the background colour on the mouse enter is always different to what i set.

I have tried all the different flat settings on if set to ‘flat’ the background colour allways appears different despite to to directly set the colour - if i set the flat to ‘popup’ then the background colour changes fine but the borders go all funny on the mouse enter.

I just wondered if anyone had any ideas - my button code is below
cheers

    Private Sub Button5_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.MouseEnter
        Button5.Image = My.Resources.Left
        Button5.FlatStyle = FlatStyle.Popup
        Button5.BackColor = Color.MistyRose


    End Sub

    Private Sub Button5_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.MouseLeave
        Button5.Image = My.Resources.Left_down
        Button5.FlatStyle = FlatStyle.Popup
        Button5.BackColor = Color.MistyRose

    End Sub

Share/Save/Bookmark

1 Star2 Stars
Loading ... Loading ...

0 responses so far!

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word