Form Icon

Vassago

Former Staff Turned AWF Retiree
Local time
Today, 11:15
Joined
Dec 26, 2002
Messages
4,748
I pasted the code exactly as it said to do and it worked for me. I created a new module for the functions and added the one line of code to my form. Did you try this on a brand new DB, or modified an existing DB. Perhaps you are already allocating the Window's handle with another call?
 
Thanks for the reply, I don't really know much about that. I'll post a copy of my database tomorrow. I'm really at a dead end on this one. Are there any settings on the form properties that could affect this? What about in the database settings?

Thanks again,

Vassago
 
By referencing the user32 library, you are really going outside of Access, so I believe any settings within Access would be ignored.

Have you tried to create a DB from scratch and test it on a form there?
 
I just threw this together and I must be doing something wrong. Maybe I'm just not thinking today.

What do you think?
 

Attachments

I had no problems after converting to A2K, but when I converted back it said there maybe a reference missing in the 97 version, so attached is the db (97) with a screen shot of the references used in A2K

IMO
 

Attachments

Hmm ... when I put in the path to an icon on my system, it works fine in A97.

The references should not make a difference since we are manually referencing the library in the module.

Try a different icon. Do a search on your computer for *.ico. Confirm that the path is correct. Perhaps C:\Program Files\Microsoft Office\Office\forms\1033\TASKL.ICO

What OS are you on?
 
I am using Windows NT. I have tried three different icons. The only thing I can think of is the OS. What do you think? Thanks for your help in this matter.
 
Sounds like 2 different situations with icons.

In a shortcut on a desktop, you can specifiy an icon. This is true for Win NT, 2K, XP, etc.

In an MDB, you can specify an icon for the Access window. This is true for Access 97 and up. It is an options under "Startup".

Is this what your are looking for ?

RichM
 
Thanks for the reply Rich. The code posted above will change the icon on the form within Access when opened in form view. I was working with a database that has Access minimized, so wanted the forms themselves to display an icon of my choice. Everyone else said this works for them, but it doesn't seem to work for me. Anyone else give this a try?
 
Well, let's try this for giggles. I will be using the icon I post here and stepping through the code. Here are the values I get on my NT machine for each of the variables:


X = 16
Y = 16
lIcon = 2818767 <-- this # should be different for you, but still a Large Integer
lResult = 0

hex const:
WM_SETICON = 128
LR_LOADFROMFILE = 16
 

Attachments

Wouldn't you know it? When I downloaded your icon and used it, it worked. How come I couldn't get five different icons to work and your own American flag worked? This is gonna drive me mad. The icon I'd like to see working is posted below. What do you think?

Thanks!
 

Attachments

While it has a .ico extension, I don't believe it is truely an icon file. I tried to open the icon I posted in the Imaging program, under Accessories, and I wasn't able to, while I was able to open your file. There is a program called IconCreator, I believe. You should be able to convert your image there.
 
I know that this thread is old, I followed this and managed to get it to work. However when my database is minimised it does not show my icon on the bottom of the sceen it shows the tacky access icon. The problem i have is that my users have a number of databases that they used, and it would be better if the icon appeared on the bottom status bar ( where system tray is) so that they know which databases they have open and are able to easily switch between them.
 

Users who are viewing this thread

Back
Top Bottom