Results 1 to 2 of 2

Thread: highlight a particular row in MSHFlexGrid

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    1

    highlight a particular row in MSHFlexGrid

    I am very much new in VB 6.0 programmig.
    Can someone guide me how to highlight a particular row (entire row).
    I am using ADO in my program, and database is in ACCESS 2000.
    After clicking command buttons I can navigate thorough my recordset to and fro.
    I want to highlight the Particular row at which my recordset is at present and also the highligted row come to be in visible height of the MSHFlexGrid so that users do not have scroll up and down for the visualization of highlighted recordset.

  2. #2
    Junior Member
    Join Date
    Dec 2005
    Location
    Surat,India
    Posts
    29

    Cool Re: highlight a particular row in MSHFlexGrid

    hi
    here is code for u.

    VB Code:
    1. Private Sub MSH_Click()
    2.     Dim R As Integer
    3.     R = MSH.Row
    4.     For J = 1 To MSH.Rows - 1
    5.         For I = 0 To MSH.Cols - 1
    6.             MSH.Row = J
    7.             MSH.Col = I
    8.             MSH.CellFontBold = False
    9.             MSH.RowHeight(J) = 240
    10.             MSH.CellForeColor = vbBlack
    11.         Next I
    12.     Next J
    13.     For I = 0 To MSH.Cols - 1
    14.         MSH.Row = R
    15.         MSH.Col = I
    16.         MSH.CellFontBold = True
    17.         MSH.CellForeColor = vbRed
    18.     Next
    19.     MSH.RowHeight(R) = MSH.RowHeight(R) + 100
    20. End Sub

    Virendrasinh Narendrasinh Mahida
    ----------------------------------
    There is Never a WRONG time to do the RIGHT Thing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width