Capturing mouse wheel events

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Evgeny Zoldin

    #1

    Capturing mouse wheel events

    Hi, ALL

    Does anybody know how to capture mouse wheel events in C# occured on the
    control that natively does not suppot them (e.g. MS Flex Grid)? I have code
    hooks windows messages in VB6. I've translated it into C#, but it does not
    work :-(

    Any another idea?

    Thanks
    Evgueny


  • Mitchell Geere

    #2
    Re: Capturing mouse wheel events

    Firstly porting from VB6 to C# is not so good, a rewerite is better due to
    the fast differences in the two languages ... not sure about the mouse
    scroll though... *scratches his head and starts googling*


    "Evgeny Zoldin" <ezo1111@hotmai l.com> wrote in message
    news:OtB62ofsDH A.3140@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Hi, ALL
    >
    > Does anybody know how to capture mouse wheel events in C# occured on the
    > control that natively does not suppot them (e.g. MS Flex Grid)? I have[/color]
    code[color=blue]
    > hooks windows messages in VB6. I've translated it into C#, but it does not
    > work :-(
    >
    > Any another idea?
    >
    > Thanks
    > Evgueny
    >
    >[/color]


    Comment

    • Evgeny Zoldin

      #3
      Re: Capturing mouse wheel events

      OK, I found code from MSDN, use it. It hooks WH_MOUSE hook, I could refine
      it and hooked WHEEL event only, but I couldn't define the direction and
      "amount" of wheel rotation because standard mouse hook returns pointer to
      MOUSEHOOKSTRUCT which does not contait that info... :-(

      "Mitchell Geere" <mgeere@telkoms a.net> wrote in message
      news:e8G4YOgsDH A.640@tk2msftng p13.phx.gbl...[color=blue]
      > Firstly porting from VB6 to C# is not so good, a rewerite is better due to
      > the fast differences in the two languages ... not sure about the mouse
      > scroll though... *scratches his head and starts googling*
      >
      >
      > "Evgeny Zoldin" <ezo1111@hotmai l.com> wrote in message
      > news:OtB62ofsDH A.3140@TK2MSFTN GP11.phx.gbl...[color=green]
      > > Hi, ALL
      > >
      > > Does anybody know how to capture mouse wheel events in C# occured on the
      > > control that natively does not suppot them (e.g. MS Flex Grid)? I have[/color]
      > code[color=green]
      > > hooks windows messages in VB6. I've translated it into C#, but it does[/color][/color]
      not[color=blue][color=green]
      > > work :-(
      > >
      > > Any another idea?
      > >
      > > Thanks
      > > Evgueny
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...