Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MouseHook as Public Function (2K)

    Good Morning All,

    I have the following code to turn MouseScroll On/Off.

    It works just fine, however, it ONLY applys to the form it's in. I need this to work on 6 different forms, therefore, I want to make this a PUBLIC SUB/FUNCTION.

    I know I need to: Public Sub MouseON () and Public Sum MouseOff()....and put the code in there, however, I get an error message: "Can't find Hookdll". I've encluded "txtStatus" in all 6 forms. So I don't believe that's the issue.

    I think it's the way I'm inserting the text or what I'm NOT including correctly.

    Can someone please direct me?

    The attached file contains a module and 2 Private Subs for the form:
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MouseHook as Public Function (2K)

    Hi Roberta,

    I don't see the attachments.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MouseHook as Public Function (2K)

    You didn't mention that you are using Stephen Lebans' MouseWheelOnOff dll and code.

    According to Stephen's notes, once you turn the mouse wheel off, it will remain off during that Access session, for all forms. So there is no real need to put the code in all forms. Apart from that, the modMouseHook module that you copied from Stephen's demo database into your own (I hope) already contains public functions MouseWheelON and MouseWheelOFF, so there is no need to create public functions yourself.

  4. #4
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MouseHook as Public Function (2K)

    So sorry...will try again
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MouseHook as Public Function (2K)

    Thanks Hans,

    I will give it a try....however, the code doesn't belong to Steve, it belongs to Terry Kreft, whoes name is mentioned.....

    Once I noticed your comment (as I would never do that), I reviewed the attachment....and attached the wrong one...

    So sorry...I will, however, give the suggestion a run.

    Thanks
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •