From: JanAdam on
How to read mouse wheel rotation in VB6?
I am not a programmer. I need to control a step motor from a computer via a
serial port. I am trying to write a code to move the motor one way or another
by using a mouse wheel, when a mouse cursor is placed on a control button on
a form. I know the protocol for the motor controller. I need to read the
number of wheel steps and direction of the wheel rotation. I know how to make
the form responding to clicking on the button, but do not know how to make it
responding to the wheel rotation. WM_MOUSEWHEEL notification gives me all
that I need but I do not know how to use it in my control button code in VB6.
Any help will be greatly appreciated.

--
JanAdam
From: Karl E. Peterson on
JanAdam wrote:
> How to read mouse wheel rotation in VB6?
> I am not a programmer. I need to control a step motor from a computer via a
> serial port. I am trying to write a code to move the motor one way or another
> by using a mouse wheel, when a mouse cursor is placed on a control button on
> a form. I know the protocol for the motor controller. I need to read the
> number of wheel steps and direction of the wheel rotation. I know how to make
> the form responding to clicking on the button, but do not know how to make it
> responding to the wheel rotation. WM_MOUSEWHEEL notification gives me all
> that I need but I do not know how to use it in my control button code in VB6.
> Any help will be greatly appreciated.

Seems the only thing you don't know is that Google knows all?

http://www.google.com/search?q=vb+wm_mousewheel

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Matthias Immhoff on
You must subclass. I attached a sample, I think it's convenient.
Cheers!
From: MikeD on

"JanAdam" <JanAdam(a)discussions.microsoft.com> wrote in message
news:4F1CDAC9-BA1C-44AF-9C1A-DCE53E15368B(a)microsoft.com...
> How to read mouse wheel rotation in VB6?
> I am not a programmer. I need to control a step motor from a computer via
> a
> serial port. I am trying to write a code to move the motor one way or
> another
> by using a mouse wheel, when a mouse cursor is placed on a control button
> on
> a form. I know the protocol for the motor controller. I need to read the
> number of wheel steps and direction of the wheel rotation. I know how to
> make
> the form responding to clicking on the button, but do not know how to make
> it
> responding to the wheel rotation. WM_MOUSEWHEEL notification gives me all
> that I need but I do not know how to use it in my control button code in
> VB6.
> Any help will be greatly appreciated.


Just an opinion, but if you're not a programmer, you should probably hire
one to do this job because it will involve subclassing...something a
non-programmer CERTAINLY should not be attempting to do.

--
Mike
Microsoft MVP Visual Basic


From: JanAdam on
Karl, no need for sarcasm.
I did Google before posting. Most relevant postings I found deal with using
the wheel in IDE. Some are written in languages I do not know. Some are by
far too advanced for me as I only have a rudimentary knowledge of VB. I have
tried to use the code in http://www.adit.co.uk/html/mousewheelsupport.htmlf
but run into problems with type declarations. I only posted my question
because I need some help.
--
JanAdam


"Karl E. Peterson" wrote:

> JanAdam wrote:
> > How to read mouse wheel rotation in VB6?
> > I am not a programmer. I need to control a step motor from a computer via a
> > serial port. I am trying to write a code to move the motor one way or another
> > by using a mouse wheel, when a mouse cursor is placed on a control button on
> > a form. I know the protocol for the motor controller. I need to read the
> > number of wheel steps and direction of the wheel rotation. I know how to make
> > the form responding to clicking on the button, but do not know how to make it
> > responding to the wheel rotation. WM_MOUSEWHEEL notification gives me all
> > that I need but I do not know how to use it in my control button code in VB6.
> > Any help will be greatly appreciated.
>
> Seems the only thing you don't know is that Google knows all?
>
> http://www.google.com/search?q=vb+wm_mousewheel
>
> --
> ..NET: It's About Trust!
> http://vfred.mvps.org
>
>
>