MSHFlexgrid issue

I am using a MSHFlexgrid in VB 6.0.   This grid is on a frame .   I access the frame by clicking antoher grid to grab a record, then clicking a button .  this button clears the grid , populates it.  Displays the frame.  This works fine.   the issue is this.     Lets say the first time the grid is displayed it shows 100 records but I use scroll bar to see them.  When I go back and reselect new data to look at, click the button, clear the grid, populate the grid, display the frame   the scroll bar is at the position last used,  scrolled down, not at the top or first record of the grid.    I have never had this problem but suspect it has something to do with the grid being on the same form.  Other ties I have used grids they were on different forms and thus all the settings were reset, I believe.  Any ideas if that is the case and how to get the scroll bar to set correctly?   Also,  any idea why snice moving to XP my wheel mouse doesnt work on grids in vb 6?
LVL 2
mmcmillenAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
23637269Connect With a Mentor Commented:
I am having a problem loading MSHFLXGD.OCX within Vista.

When you set .Row=number the RowSel and ColSel are automatically reset and become the current cell.
Sometimes in VB you have to send a .Refresh to the control, kind of like a DoEvents to give it a chance to repaint itself.

If a control dosen't have a property 'available' within vb environment you can use object.hWnd to get the handle which will let you use an API to do just about anything.

When I get the component added I can give you more help.
0
 
23637269Commented:
You can set the scrollbar's Min to 1 and max to RecordCount and then set the value to whatevery you want.
Depending on the control object you use you may need to send:
ControlName.Update  or  ControlName.Refresh
0
 
mmcmillenAuthor Commented:
how do I do that on a MSHFlexgrid?  I dont see any properties specifically for the scrollbar.  
0
 
mmcmillenAuthor Commented:
I fixed it.    I used   grd.rows =  my default value of rows for the grid.    Thanks for the help .   Not exactly the answer but got me looking in the right place.
0
All Courses

From novice to tech pro — start learning today.