mousewheel

A

alex

Hello Experts,

I'm trying to use the MouseWheelHook graciously provided by Mr.
Lebans.

I've copied the DLL into the same folder as the mdb.

I've added the following code to the load event of my form:

Private Sub Form_Load()
' Turn the MouseWheel Off
Dim blRet As Boolean
blRet = MouseWheelOFF
End Sub

When I open the form I'm getting a Compile error: Variable not
defined.

I've tried to do my homework and have looked at archived mousewheel
postings on the group. Others have had problems too, but I still
can't get the thing to work.

I'm not a VBA expert, but when I type blRet =, my only/suggested
options are true or false. Maybe this has something to do with it.

Any ideas? Thanks for the time.

alex
 
S

storrboy

Hello Experts,

I'm trying to use the MouseWheelHook graciously provided by Mr.
Lebans.

I've copied the DLL into the same folder as the mdb.

I've added the following code to the load event of my form:

Private Sub Form_Load()
' Turn the MouseWheel Off
Dim blRet As Boolean
blRet = MouseWheelOFF
End Sub

When I open the form I'm getting a Compile error: Variable not
defined.

I've tried to do my homework and have looked at archived mousewheel
postings on the group. Others have had problems too, but I still
can't get the thing to work.

I'm not a VBA expert, but when I type blRet =, my only/suggested
options are true or false. Maybe this has something to do with it.

Any ideas? Thanks for the time.

alex


I'm not familiar with the MouseWheelHook, but if it's a dll, was it
registered on the computer using regsvr32.exe?
 
A

alex

I'm not familiar with the MouseWheelHook, but if it's a dll, was it
registered on the computer using regsvr32.exe?- Hide quoted text -

- Show quoted text -

the DLL is a standard WIndows DLL. it does not need to be registered
or referenced.
 
D

Dirk Goldgar

alex said:
Hello Experts,

I'm trying to use the MouseWheelHook graciously provided by Mr.
Lebans.

I've copied the DLL into the same folder as the mdb.

I've added the following code to the load event of my form:

Private Sub Form_Load()
' Turn the MouseWheel Off
Dim blRet As Boolean
blRet = MouseWheelOFF
End Sub

When I open the form I'm getting a Compile error: Variable not
defined.

I've tried to do my homework and have looked at archived mousewheel
postings on the group. Others have had problems too, but I still
can't get the thing to work.

I'm not a VBA expert, but when I type blRet =, my only/suggested
options are true or false. Maybe this has something to do with it.

Any ideas? Thanks for the time.

Did you also import the modMouseHook module into your database? I
believe you have to do that.
 
A

alex

Did you also import the modMouseHook module into your database? I
believe you have to do that.

--
Dirk Goldgar, MS Access MVPwww.datagnostics.com

(please reply to the newsgroup)- Hide quoted text -

- Show quoted text -

I did not import any module into the database.

It appeared that I only needed to copy/paste the DLL and then insert
the aforementioned code behind a command or in the load event.

I'll continue to look at the sample database for hints.

thanks

alex
 
S

Stephen Lebans

Alex you MUST import the code m odule named modMouseHook from my sample MDB
into your own MDB.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

alex

Alex you MUST import the code m odule named modMouseHook from my sample MDB
into your own MDB.

--

HTH
Stephen Lebanshttp://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.









- Show quoted text -

Stephen/Dirk,

Thanks for the response.

I placed the module in my database, copied the dll into the same
folder, then added the code under the form's load event.

...the mouse wheel still works.

When I added the code to the load event, I only added the
'mousewheelOFF' event because I don't care or need the little bugger
back on. Maybe that's an issue?

alex
 
A

alex

Stephen/Dirk,

Thanks for the response.

I placed the module in my database, copied the dll into the same
folder, then added the code under the form's load event.

..the mouse wheel still works.

When I added the code to the load event, I only added the
'mousewheelOFF' event because I don't care or need the little bugger
back on. Maybe that's an issue?

alex- Hide quoted text -

- Show quoted text -

Gentlemen,

It looks like i might have the problem solved (with your help of
course)

I had downloaded the dll and module from the 97 example and I have
'03.

I've added the dll to the folder and module to the database.
I then added the code to the form's load event and it appeared to stop
the mouse wheel.
I also added the mousewheelON to the unload event, so i'm assuming
that I need to add the code to every form; or maybe turn the
mousewheelON in my switchboard's unload event.

Thanks again,

alex
 
S

Stephen Lebans

Copy and paste all of your code behind the form that is calling the
MouseWHeelOff function in its Load event.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

alex

Gentlemen,

It looks like i might have the problem solved (with your help of
course)

I had downloaded the dll and module from the 97 example and I have
'03.

I've added the dll to the folder and module to the database.
I then added the code to the form's load event and it appeared to stop
the mouse wheel.
I also added the mousewheelON to the unload event, so i'm assuming
that I need to add the code to every form; or maybe turn the
mousewheelON in my switchboard's unload event.

Thanks again,

alex- Hide quoted text -

- Show quoted text -

I've added the code to on load/unload event of my swithboard (if
anyone cares and is still following this string)
It appears to be working...

One issue though, when I save everything and exit, then enter the
database again, the properties box for the switchboard opens with the
switchboard in form view (in startup). This database is locked as
tight as I can get it, so this is strange. When I exit again, and
again open, the properties box is gone. I'm a little worried that the
properties box will open when my end users start to enter data.
 
D

Dirk Goldgar

alex said:
One issue though, when I save everything and exit, then enter the
database again, the properties box for the switchboard opens with the
switchboard in form view (in startup). This database is locked as
tight as I can get it, so this is strange. When I exit again, and
again open, the properties box is gone. I'm a little worried that the
properties box will open when my end users start to enter data.

When you saved the form, did you make sure the "Allow Design Changes"
property (on the Other tab of the form's property sheet in design view)
was set to "Design View Only"?
 
A

alex

When you saved the form, did you make sure the "Allow Design Changes"
property (on the Other tab of the form's property sheet in design view)
was set to "Design View Only"?

Dirk,

it was not set to "Design View Only."

that might have been the problem. Thanks for helping and your advice
earlier!

alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top