Customise Access icon in Windows 7 taskbar (1 Viewer)

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
Hi all,

I tried searching for a solution on this one.

Quite sure all of us try our best to hide all traces of Access on our "commercial" apps. However with Win7 I find that the "normal" MS Access icon is showing on my taskbar instead of my custom icon I have showing on other versions of Windows.

Anyone found a cure for this?

Thanks
Pierre
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
Hi,

i have. In my applications, i can hide the actual Access Window completely and only show an icon in the task bar if i minimise my form. It also shows to app icon rather than the traditional Access icon. I have a stable systray function that dynamically creates a menu on the fly when right clicked to maximize and other useful tools :)

I can post a code sample but, it tooks months of hard work to get right.

I'll post the icon handling code. This is actually used in my Splash screen application which allows a user to add a custom spalsh screen to their app and then manages desktop shortcuts / icons. It also hides the main Access window during startup to give a true representation of a splash screen appearing 'first'

The main essence is, it can be done.


thanks

Nigel
 

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
Hi Nigel,
I appreciate the fact that it took you long to do. I also have code to hide the "outer" Access screen.

Thing is - On XP and Win2000 the icon on the taskbar is the same one I used for my desktop shortcut and which I spesify in the Setup screen.
However on Win7 it refuses to use the chosen icon and refers back to the normal MS Access icon.

I would appreciate it if you could let me in on how you manage to make Win7 listen to you :)

Cheers
Pierre
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
Hi Pierre,

no problem. I'll post the code for the icon :) wont be until late though when i get home.


Cheers


Nigel
 

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
Thanks a span - will keep an eye on my post :)
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
Sorry dude

On holidays at the mo. I'll post it tomorrow ( 11pm UK time at the minute )

Cheers
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
Hi

Finally...... here is my code-
Code:
Public Sub SetIcon()
Dim strIcon As String
strIcon = "C:\Users\MyPath\MyIcon.ico"
ChangeProperty "AppIcon", dbText, strIcon
End Sub

Function ChangeProperty(strPropName As String, varPropType As String, varPropValue As Variant) As Integer
    
    Dim dbs As DAO.Database
    Dim prp As DAO.Property
   
    Set dbs = CurrentDb
    On Error GoTo PROC_ERROR
    
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

PROC_EXIT:
    On Error Resume Next
    Set prp = Nothing
    Set dbs = Nothing
    Exit Function

PROC_ERROR:
    If Err.Number = 3270 Then
        Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
        dbs.Properties.Append prp
        Resume Next
    Else
        ChangeProperty = False
        Resume PROC_EXIT
    End If
End Function

This works absolutely fine for me barr i pass the icon path differently and do not have it hard coded.

Let me know how you get on


Cheers
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
Well did it work?

Sent from my OMNIA7 using Board Express
 

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
Hi Nigel - a 1000 appologies - I never received an email about your reply (like I normally do) hence the delay.
Your code works, but nothing diffrent from pointing the icon in the "Startup" section of Access manually, so the result on my side is still the same.

However I did find some extra settings on Win7 causing problems:

Have a look at the 2 attached screen shots and you'll see what I mean.
In the one called "Wrong" I would like to get rid of the Access logo.

It will probably call for a registry change which will mess up the User's prefrences...

Any ideas on that?

Thanks guys
 

Attachments

  • Correct.jpg
    Correct.jpg
    55.4 KB · Views: 2,001
  • Wrong.jpg
    Wrong.jpg
    51.8 KB · Views: 1,805

boblarson

Smeghead
Local time
Today, 09:13
Joined
Jan 12, 2001
Messages
32,059
Hi Nigel - a 1000 appologies - I never received an email about your reply (like I normally do) hence the delay.
Your code works, but nothing diffrent from pointing the icon in the "Startup" section of Access manually, so the result on my side is still the same.

However I did find some extra settings on Win7 causing problems:

Have a look at the 2 attached screen shots and you'll see what I mean.
In the one called "Wrong" I would like to get rid of the Access logo.

It will probably call for a registry change which will mess up the User's prefrences...

Any ideas on that?

Thanks guys

The problem with what you are looking to do, as referenced by the screenshots is going to change the way the user's task bar functions for ALL of their programs and users don't necessarily like that you are deciding how their task bar works. Some like the grouping option and will be miffed if you take it away simply so your icon shows up.
 

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
HI Bob,

I fully agree, hence the reason for the "..." after the comment :)

I don't thing Developers have the "right" to change User settings.
Having said that, I always change a User's date format to the South African one as most don't know how to and sits with the American one. No offence guys!

Other than that I keep things as per the User's settings.

It just makes me mad that M/Soft mess things up for the "Commercial" developer by forcing the Access logo to appear after we go through lots of steps to make an app look commercial.

How know - maybe showone knows how to just change the Access icon to the custom one...

Cheers
Pierre
 

boblarson

Smeghead
Local time
Today, 09:13
Joined
Jan 12, 2001
Messages
32,059
It just makes me mad that M/Soft mess things up for the "Commercial" developer by forcing the Access logo to appear after we go through lots of steps to make an app look commercial.
No argument there. They have done a lot of things which irritate me as a developer and you should be prepared for more as they have done some stuff that will probably irritate you even more when you ever get to Office 2013 (the newest version coming out). They are catering to "new users" rather than developers.
How know - maybe showone knows how to just change the Access icon to the custom one...
I don't know and, even if I did, it would violate the End User Licensing Agreement.
 

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
you should be prepared for more as they have done some stuff that will probably irritate you even more when you ever get to Office 2013 (the newest version coming out). They are catering to "new users" rather than developers.

That is why I'm a die-hard 2003 fan - It still caters for the developer from a commercial app point of view more than 2007 & 2010.

In spite of having 2007 on my laptop and 2010 on another desktop it is all for testing purposes. I do all my stuff still on my main desktop with 2003 running. I also find it much more time-consuming to do any developement in the other 2. It just has that juck feeling to it. I want to wash my hands after working on them :)

I sometimes roll my 2003 apps out with a 2010 run-time for a more "modern look" and a few extra user features.

Let me not start with the ribbon and creating custom menu bars issues compare to the ease of 2003!!!

Cheers guys
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
Hi

In the immediate window in the VBA screen, what result do you get jf you type

?apptitle

Cheers

Sent from my OMNIA7 using Board Express
 

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
Hi Nigel,
I get the name of my app as inserted into the App Name field in the Startup setup under Tools menu.
But inspite of having a name there, if you set the Win7 option to hide the name lable on the taskbar then you are left with the original Access logo and not my custom icon.
It is only when you choose not to hide the taskbar lables that you then get both the app name and the custom icon.

Are you running Win7?
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
Why try and hide the icon labels? You should only focus on your app. I don't hide the labels and I get both my icon and title. Would the hiding of the label be a user option rather than an application feature? I wouldn't be happy with an application changing my environment.

Cheers



Sent from my OMNIA7 using Board Express
 

NigelShaw

Registered User.
Local time
Today, 17:13
Joined
Jan 11, 2008
Messages
1,573
violate the end user licencing agreement

I wouldn't have thought this applies seeing as there is an option in the settings to change the icon unless I have misunderstood :S

Cheers

Sent from my OMNIA7 using Board Express
 

Freshman

Registered User.
Local time
Today, 19:13
Joined
May 21, 2010
Messages
437
Why try and hide the icon labels? You should only focus on your app. I don't hide the labels and I get both my icon and title. Would the hiding of the label be a user option rather than an application feature? I wouldn't be happy with an application changing my environment.

Yes - if you go have a look at my screen shots you will find that it all depends on how the User set up his Win7 taskbar.
However as I said - if the User doesn't hide the labels then all is fine but if he sets it to hide the labels then the icons reverts back to the original Access icon :(
 

SamiFrance

New member
Local time
Today, 09:13
Joined
Sep 24, 2012
Messages
6
Hi Everybody,

It seems that I have found a very nice and simple turnaround to make W7 show your MS Access Application with its custom shortcut !

You have to create a shortcut with a command line in the target that call msaccess.exe or directly your .mde as you want. Then put your custom icon to this shortcut. The result is magic : your application is openned in a dedicated group in W7 taskbar and if your re-run the same shortcut to open multiple session of your Application, it will go in this dedicated group !!!

Of course, you can automatize shortcut creation and execution with simple vba or vbs code using createshortcut Windows API or WScript.Shell
 

Users who are viewing this thread

Top Bottom