I have a Flexgrid in my form I am trying to highlight the whole row when I click the right mouse button, but it is not working with me..

This is the code I am using:

VB Code:
  1. Private Sub msflexgrid1_MouseDown(Button As Integer,
  2. Shift As Integer, X As Single, Y As Single)
  3.  
  4.     If Button = vbRightButton Then
  5.         msflexgrid1.Col = 1
  6.          msflexgrid1.ColSel = msflexgrid1.Cols - 1
  7.    
  8.      End if
  9. End sub

Any suggestion??

Thanks in advance