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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
23637269Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.