View Single Post
Join Date: Apr 2008
Posts: 114
Reputation: ninjaimp is an unknown quantity at this point 
Solved Threads: 6
ninjaimp ninjaimp is offline Offline
Junior Poster

button background colour on mouse enter event

 
0
  #1
Nov 20th, 2008
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

  1. Private Sub Button5_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.MouseEnter
  2. Button5.Image = My.Resources.Left
  3. Button5.FlatStyle = FlatStyle.Popup
  4. Button5.BackColor = Color.MistyRose
  5.  
  6.  
  7. End Sub
  8.  
  9. Private Sub Button5_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.MouseLeave
  10. Button5.Image = My.Resources.Left_down
  11. Button5.FlatStyle = FlatStyle.Popup
  12. Button5.BackColor = Color.MistyRose
  13.  
  14. End Sub
Reply With Quote