Subclassing in VB6


I am trying to use subclassing in a VB6 app to enable the scroll wheel of the mouse.  Apart from the usaul horrors about the IDE crashing etc - which i don't kow if anyone has a resolution for?  I have one form that has a flex grid that is editable by placing a text box over the selected cell and then entering a value, which is then placed in the flexgrid.  When i use the mouse wheel on this form nothing happens, i am guessing that i may have the order of the events firing wrong.  Has anyone come across this situation and if so how did they get round it?

Also if anyone knows a more stable way of using the Scroll Wheels in a VB6 application please get in touch.
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.

1114goddersAuthor Commented:
Well got round the IDE crashing by using some boolean values to check if a form or submorm was sublassed and then check to see if we are in the IDE mode.  If so then unhook the offending form - so far so good.  Just the problem with the text box on the flex grid now.
hi there are sample codes that enables mouse wheel scrolling

for flex grid

for textbox

hope this helps
1114goddersAuthor Commented:
ee rlee

I actually have the scroll wheel functioning in the application, the problem was where i had a flex grid that was editable by means of placing a text box over a cell.

I have now solved this problem by placing the unhook at the start of the LeveCell event then hook the form at the end of the code after;

Private Sub G_LeaveCell()

If SUBCLASSED_SUB = True Then 'SUBCLASSED_SUB is a boolean value that states if the form is      subclassed or not
        'Unhook the form
 End If

    Some code here........

    'Hook the form again
    SubWheelHook Me

End Sub

Then on the scroll event of the grid set the focus on the grid if we scroll past a selected row.

voilĂ , scroll wheel on a Flex Grid that is editable....

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
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.