Solved

Using the mousehook from Lebans.com in an access project

Posted on 2004-04-13
10
310 Views
Last Modified: 2007-12-19
Ok, I've downloaded mousehook from  http://www.lebans.com/mousewheelonoff.htm and have sucessfully gotten it to work on a small stand alone access database, with a couple of users, by putting the dll in the same folder as the database.  I'd like to use it in a larger app I have set up as a SQL server backend and Access Project front end.  

I can't seem to get it to work.  I put the code in the OnLoad event of the first form that opens, so it disables the wheel right away.  However when the form is loaded is comes up with an error the dll can't be found.  I've put the dll in the same folder as the front end.  

Has anyone used the mousehook in this manner before, that might be able to shed some light on my situation?

Thanks
Tom
0
Comment
Question by:TomDuCrosbie
  • 4
  • 3
  • 3
10 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 10815710
Greetings TomDuCrosbie!

  The dll needs to be registered by the Installer app when it loads, or manually if no deployment app is used.
 
  Measures need to be taken to assure that another more current dll is not already registered and running that another application may depend on.

regards
jack
0
 

Author Comment

by:TomDuCrosbie
ID: 10815794
THe notes on Lebans.com said  not to register or set references to the dll from within access, just placed in the folder where the app front end is located, or place into the windows/system file.

My network admin wouldn't allow me to use the knowledge base method with the registring of the dll.  so I'm trying to get it to work around it.

Tom
0
 
LVL 32

Expert Comment

by:jadedata
ID: 10816136
MVPS.org also has some API mousewheel control but this is going to be OS specific perhaps.
 http://www.mvps.org/access/api/api0036.htm
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 32

Expert Comment

by:jadedata
ID: 10816201
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 100 total points
ID: 10817310
Hmm, I use this version:
http://support.microsoft.com/default.aspx?scid=kb;en-us;278379

In the "all Access" way and it does work in a network environment.

Nic;o)
0
 

Author Comment

by:TomDuCrosbie
ID: 10817656
Nico, I added the code for the "all  access" version, however now when I compile the code, I get a comple error on a line that previously didn't raise any errors.  here's the code

    Else
        DoCmd.Close acForm, "frmExistingCustomer"
        'check to see if the frmexisting business form is open
        'if it is not, open the switchboard
        varState = SysCmd(acSysCmdGetObjectState, acForm, "frmExistingBusiness")
        If varState = 1 Then
            Exit Sub
        Else
            DoCmd.OpenForm "Switchboard"
        End If
    End If

The line raising the compile error is

varState = SysCmd(acSysCmdGetObjectState, acForm, "frmExistingBusiness")

Any ideas as to why this is happening?

tom
0
 
LVL 54

Expert Comment

by:nico5038
ID: 10817747
Nope, looks very odd, what's the error message ?

Nic;o)
0
 

Author Comment

by:TomDuCrosbie
ID: 10822929
The error is

Compile Error
Variable not defined

0
 

Author Comment

by:TomDuCrosbie
ID: 10824046
Wow!  it's amazing how a little sleep and a pot of coffee can clear things up.  I had been writing in notes about the code and accadently put a   '    in front of where I declaired varState.

It's working great again.  Thanks for the help!

Tom
0
 
LVL 54

Expert Comment

by:nico5038
ID: 10825201
It are always those nasty tiny bugs...

Glad it's working !

Nic;o)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question