how to lock mouse wheel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • buddydasari
    New Member
    • Mar 2007
    • 14

    how to lock mouse wheel

    Hi
    I want to lock the mouse wheel cause scrolling takes to next record in my application.I tried to find online but no use.I found some article

    but i don't want to use thirdparties.

    Is there any other way to implement it?Is it difficult to implement one?

    thanks
    Sree
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Not unless you're running Access 2007, which finally addressed the problem. Lebans hack has pretty much been the gold standard for years now. It's really not hard at all.

    First, download and unzip the db and take a look. Go into your db and goto File > External Data > Import and import the module modMouseHook from the sample database.

    Next make sure you have the included file, MouseHook.dll, in the same folder your database resides in.

    The following code needs to run before the mousewheel will be locked: If one particular form is always opened first, place this in that form's code module. If the first form opened varies, place it in each form's code module. Calling it more than once does no harm.
    Code:
    Private Sub Form_Load()
      'Turn off Mouse Scroll
        blRet = MouseWheelOFF
    End Sub
    You should be set now.

    Linq ;0)>

    Comment

    Working...