How to ensure that a single row will highlight in mshflexgrid.mousemove event.

Posted on 2003-10-23
Last Modified: 2010-05-01
Dear experts
         I have spent 100 points already for this question but these became useless due to it was not on proper place.
        I want to arrange a subroutine in which i want to select the specific row in mouse move event like this
                 sub mshlfexgrid1_mousemove()
                     end if
but this subroutine highlights nothing just change the row of flexgrid. if i change the routine like this.
then it highlights the multi row not a single row each time.
pls help me in thins contest.
Question by:ALIHAIDER1

Expert Comment

ID: 9609076
change the
allowBigSelection property to false and then use the above code as

Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    MSHFlexGrid1.Row = MSHFlexGrid1.MouseRow
    MSHFlexGrid1.RowSel = MSHFlexGrid1.MouseRow
End Sub



Author Comment

ID: 9612474
Sorry Jayesh
      Nothing happened. Result is as it was before.
Any other opinion.

Accepted Solution

Mahesh_kn earned 100 total points
ID: 9615489

Try this

Private Sub MSHFlexGrid1_mousemove(Button As Integer, Shift As Integer, x As Single, y As Single)
    If MSHFlexGrid1.Row <> MSHFlexGrid1.MouseRow Then
        MSHFlexGrid1.Row = MSHFlexGrid1.MouseRow
        MSHFlexGrid1.ColSel = MSHFlexGrid1.Cols - 1
    End If
End Sub

For better look change the property FocusRect = flexFocusNone


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now