Notification Area code not working....

S

s4

Hi all,

I'm using a bit of code from
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q176085
to create a notification area icon for my database, I've done everything on
the page, and copied all of the code.
When I run it I get a 'object not defined' error. I think the code on the
page is for just VB6, but I've made the little changes to make it work in my
Access project, but I think it's the form Icon part ( icon=: me.icon) becuase
I cannot set the icon on my form. I've tried changing the 'me.icon' to a file
path, but that returns a type-match error.

Can anyone help me get this to work?

Many thanks!
 
S

S.Clark

In the custom type NOTIFYICONDATA
hIcon As Long

defines hIcon as a long, so attempting to assign a string like
"\\server\path\file.bmp" isn't valid.

My guess would be that you would need to create an icon collection and some
type of handler.
 
S

s4

Thanks for the help.

How would I do this and what changes would I need to make?

Thanks again
 
S

S.Clark

My assumption is that the way the VB one works, is that there exists a
collection of icons, each identified by an integer value. Then the form has
a integer based property called 'Icon'. So, to mimic, you need to come up
with some way to store the icons, enumerate them, then assign the integer to
the form.

On Access forms, you can create custom properties. Your collection of icons
could be a table with an autonumber and a path to where the icon resides.

--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting
 
S

s4

Thanks a lot for that. I got the Icon working, it's there at the bottom!

Only trouble now is that the events that I've put in under each different
mouse clicks don't work. So when you click the icon nothing happens. It's
there but doesn't do anything...

Any suggestions?

One day it'll all work I hope. lol

Many Thanks
 

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

Similar Threads


Top