MouseWheel off without DLL?

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

    MouseWheel off without DLL?

    Is it possible to disable the mouse wheel WITHOUT using a DLL?

    I've looked at Microsoft Knowledge Base Article 278379
    (http://support.microsoft.com/default...;en-us;278379), which
    explains how to create a DLL and implement code to disable the mouse wheel,
    as well as Mr. Lebans' code in MouseWheelHookA 2K.zip
    (http://www.lebans.com/mousewheelonoff.htm), but both require a DLL.

    Sure, it's easy enough to run:

    regsvr32 "C:\Program Files\MyDatabas e\MouseWheel.DL L"

    But the less users have to do the better. I think I remember seeing some
    code somewhere that did not use a DLL... or was just an illusion?


  • Stephen Lebans

    #2
    Re: MouseWheel off without DLL?

    Did you even notice with my solution that you MUST NOT try to Register
    the MouseHook DLL as it is a standard WIndows DLL not an ActiveX DLL.
    You simply copy the DLL into the same folder as your MDB and your users
    do not have to do anything.

    --

    HTH
    Stephen Lebans

    Access Code, Tips and Tricks
    Please respond only to the newsgroups so everyone can benefit.


    "deko" <deko@hotmail.c om> wrote in message
    news:mkagc.5243 6$XV5.3314@news svr25.news.prod igy.com...[color=blue]
    > Is it possible to disable the mouse wheel WITHOUT using a DLL?
    >
    > I've looked at Microsoft Knowledge Base Article 278379
    > (http://support.microsoft.com/default...;en-us;278379),[/color]
    which[color=blue]
    > explains how to create a DLL and implement code to disable the mouse[/color]
    wheel,[color=blue]
    > as well as Mr. Lebans' code in MouseWheelHookA 2K.zip
    > (http://www.lebans.com/mousewheelonoff.htm), but both require a DLL.
    >
    > Sure, it's easy enough to run:
    >
    > regsvr32 "C:\Program Files\MyDatabas e\MouseWheel.DL L"
    >
    > But the less users have to do the better. I think I remember seeing[/color]
    some[color=blue]
    > code somewhere that did not use a DLL... or was just an illusion?
    >
    >[/color]

    Comment

    • deko

      #3
      Re: MouseWheel off without DLL?

      > Did you even notice with my solution that you MUST NOT try to Register[color=blue]
      > the MouseHook DLL as it is a standard WIndows DLL not an ActiveX DLL.
      > You simply copy the DLL into the same folder as your MDB and your users
      > do not have to do anything.[/color]

      I see. I wasn't sure what the difference was between the MouseHook.DLL and
      the DLL I created from the KB article. I'll take another look...


      Comment

      • Stephen Lebans

        #4
        Re: MouseWheel off without DLL?

        My DLL is written in C++ and uses an application wide MessageHook. This
        means the subclassing code resides in the DLL(safer) and you only have
        to invoke the MouseWheelOff function once and it looks after all forms
        you may open during the current session. It also allows the MouseWheel
        to continue to work where it should, in controls with ScrollBars
        including SubForm controls.

        --

        HTH
        Stephen Lebans

        Access Code, Tips and Tricks
        Please respond only to the newsgroups so everyone can benefit.


        "deko" <deko@hotmail.c om> wrote in message
        news:Qthgc.3791 0$i%1.24635@new ssvr29.news.pro digy.com...[color=blue][color=green]
        > > Did you even notice with my solution that you MUST NOT try to[/color][/color]
        Register[color=blue][color=green]
        > > the MouseHook DLL as it is a standard WIndows DLL not an ActiveX[/color][/color]
        DLL.[color=blue][color=green]
        > > You simply copy the DLL into the same folder as your MDB and your[/color][/color]
        users[color=blue][color=green]
        > > do not have to do anything.[/color]
        >
        > I see. I wasn't sure what the difference was between the[/color]
        MouseHook.DLL and[color=blue]
        > the DLL I created from the KB article. I'll take another look...
        >
        >[/color]

        Comment

        • deko

          #5
          Re: MouseWheel off without DLL?

          > My DLL is written in C++ and uses an application wide MessageHook. This[color=blue]
          > means the subclassing code resides in the DLL(safer) and you only have
          > to invoke the MouseWheelOff function once and it looks after all forms
          > you may open during the current session. It also allows the MouseWheel
          > to continue to work where it should, in controls with ScrollBars
          > including SubForm controls.[/color]

          Sounds great. The joker in the pack is that I want to keep the mouse wheel
          functionality on the main form in my mdb, and selectively disable it on
          other forms, some of which are popups.

          I've imported the standard module from A2KMouseWheelHo okVer21 and *did not
          put any code* in the main form's module. I put this code in the other
          (popup) forms' Form_Load events:

          Private Sub Form_Load()
          Dim blRet As Boolean
          blRet = MouseWheelOFF(F alse)
          End Sub

          And this code in the popup forms' Form_Close events:

          Private Sub Form_Close()
          Dim blRet As Boolean
          blRet = MouseWheelON
          End Sub

          Does this sound about right? Is it okay to use the above code to turn the
          mouse wheel on and off for different forms? Does it matter if I put the
          code in the Form_Open event rather than in the Form_Load event?

          It seems to be working... and I did not have to register the DLL :)


          Comment

          • Stephen Lebans

            #6
            Re: MouseWheel off without DLL?

            There are no problems with your current implementation.

            I do not understand why you would want to leave the MouseWheel turned on
            for your main form. You can't possibly want to allow the users to
            inadvertently scroll through the Recordset. Remember, with the
            MouseWheel turned off the wheel still works for all of the controls but
            simply will not allow the user to scroll through the recordset unless
            they place the cursor within the Record Navigation ToolBar.

            --

            HTH
            Stephen Lebans

            Access Code, Tips and Tricks
            Please respond only to the newsgroups so everyone can benefit.


            "deko" <deko@hotmail.c om> wrote in message
            news:Ktogc.3808 8$h%4.29513@new ssvr29.news.pro digy.com...[color=blue][color=green]
            > > My DLL is written in C++ and uses an application wide MessageHook.[/color][/color]
            This[color=blue][color=green]
            > > means the subclassing code resides in the DLL(safer) and you only[/color][/color]
            have[color=blue][color=green]
            > > to invoke the MouseWheelOff function once and it looks after all[/color][/color]
            forms[color=blue][color=green]
            > > you may open during the current session. It also allows the[/color][/color]
            MouseWheel[color=blue][color=green]
            > > to continue to work where it should, in controls with ScrollBars
            > > including SubForm controls.[/color]
            >
            > Sounds great. The joker in the pack is that I want to keep the mouse[/color]
            wheel[color=blue]
            > functionality on the main form in my mdb, and selectively disable it[/color]
            on[color=blue]
            > other forms, some of which are popups.
            >
            > I've imported the standard module from A2KMouseWheelHo okVer21 and *did[/color]
            not[color=blue]
            > put any code* in the main form's module. I put this code in the other
            > (popup) forms' Form_Load events:
            >
            > Private Sub Form_Load()
            > Dim blRet As Boolean
            > blRet = MouseWheelOFF(F alse)
            > End Sub
            >
            > And this code in the popup forms' Form_Close events:
            >
            > Private Sub Form_Close()
            > Dim blRet As Boolean
            > blRet = MouseWheelON
            > End Sub
            >
            > Does this sound about right? Is it okay to use the above code to turn[/color]
            the[color=blue]
            > mouse wheel on and off for different forms? Does it matter if I put[/color]
            the[color=blue]
            > code in the Form_Open event rather than in the Form_Load event?
            >
            > It seems to be working... and I did not have to register the DLL :)
            >
            >[/color]

            Comment

            • deko

              #7
              Re: MouseWheel off without DLL?

              [color=blue]
              > I do not understand why you would want to leave the MouseWheel turned on[/color]
              [color=blue]
              > for your main form. You can't possibly want to allow the users to[/color]
              [color=blue]
              > inadvertently scroll through the Recordset.[/color]



              There is some value add to the users if they can scroll. The database is a
              Personal Information Manager.




              Comment

              Working...