Solved

Using the mousehook from Lebans.com in an access project

Posted on 2004-04-13
10
315 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

696 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