By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,296 Members | 1,723 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,296 IT Pros & Developers. It's quick & easy.

DLL In Different Locations

P: n/a
I have an Access 2000 mdb, and I'm trying to stop the mouse wheel from
moving between records. I found an MS KB article at
http://support.microsoft.com/?kbid=278379 which gives steps for creating a
DLL that does just that. I created the DLL, set a reference to it, added the
code to use it, and everything works great.

But one problem: the people who will be using this will have the DLL located
in a different location, so the reference will be broken. Thus, I need a way
to change the reference on the fly, if possible, so that the database looks
for the DLL in one place when a flag is set one way (indicating it's my
machine), and in another place when the flag is set the other way.

Alternatively, there is late binding. However, I wasn't able to get that to
work. The DLL has a "MouseWheel" event procedure which works fine with early
binding, but not with late binding.

Any thoughts/ideas/suggestions would be appreciated.

Thanks,

Neil
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Neil Ginsberg wrote:
I have an Access 2000 mdb, and I'm trying to stop the mouse wheel from
moving between records. I found an MS KB article at
http://support.microsoft.com/?kbid=278379 which gives steps for creating a
DLL that does just that. I created the DLL, set a reference to it, added the
code to use it, and everything works great.
you might want to check out Stephen's hook:
www.lebans.com/mousewheelonoff.htm
This way you'd be able to work around the wheel-problem without a DLL.
But one problem: the people who will be using this will have the DLL located
in a different location, so the reference will be broken. Thus, I need a way
to change the reference on the fly, if possible, so that the database looks
for the DLL in one place when a flag is set one way (indicating it's my
machine), and in another place when the flag is set the other way.


if you'd like to stick with using a DLL, why don't you provide your users
with a setup (i.e. InnoSetup: www.innosetup.org) and install the DLL on
each workstation?
Otherwise, check out www.mentalis.org/tips/tip50.shtml which offers code
you may use to un-/register ActiveX-controls or DLLs from Basic. Yet
another alternative would be to simply use a shell calling regsvr32.exe.

Cheers,
Olaf [MVP]
--
My .02: www.Resources.IntuiDev.com
Nov 13 '05 #2

P: n/a
Thanks for the note, that's very helpful. It would be better not to have to
install the DLL at each workstation, but just have whatever we use be
self-contained within the MDB. Thus, Stephen's hook seems ideal.

[Interestingly, when I first loaded it, following the instructions to put
the DLL into application MDB's directory, I got an error because I clicked
"Start Mouse Wheel" first, instead of "Stop Mouse Wheel," because "Stop
Mouse Wheel" has the code to look in the MDB's directory. Logically, one
should click "Stop Mouse Wheel" first; but the "Start Mouse Wheel" button
was the first button, and one's impulse is to click the first button.
Anyway, that was interesting.]

Anyway, it looks like that should work for my needs, so thanks for pointing
that out to me, and thanks to Stephen for writing it and providing it!

Neil

"Olaf Rabbachin" <Ol*********@IntuiDev.com> wrote in message
news:ct*************@news.t-online.com...
Hi,

Neil Ginsberg wrote:
I have an Access 2000 mdb, and I'm trying to stop the mouse wheel from
moving between records. I found an MS KB article at
http://support.microsoft.com/?kbid=278379 which gives steps for creating
a
DLL that does just that. I created the DLL, set a reference to it, added
the
code to use it, and everything works great.


you might want to check out Stephen's hook:
www.lebans.com/mousewheelonoff.htm
This way you'd be able to work around the wheel-problem without a DLL.
But one problem: the people who will be using this will have the DLL
located
in a different location, so the reference will be broken. Thus, I need a
way
to change the reference on the fly, if possible, so that the database
looks
for the DLL in one place when a flag is set one way (indicating it's my
machine), and in another place when the flag is set the other way.


if you'd like to stick with using a DLL, why don't you provide your users
with a setup (i.e. InnoSetup: www.innosetup.org) and install the DLL on
each workstation?
Otherwise, check out www.mentalis.org/tips/tip50.shtml which offers code
you may use to un-/register ActiveX-controls or DLLs from Basic. Yet
another alternative would be to simply use a shell calling regsvr32.exe.

Cheers,
Olaf [MVP]
--
My .02: www.Resources.IntuiDev.com

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.