473,698 Members | 2,086 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing the desktop icon of a Microsoft Access application

4 New Member
Hey All,
I hate it when my first post on a forum is me asking a question but it is a pretty simple question which I just cannot work out.
The title of this post explains all; basically I need to change the icon of an Access Database (.mdb) from the default pinkish colored Microsoft one.
I am aware that I could perhaps create a shortcut and change the icon for this due the nature of the dynamically remapping cluster which the Shortcut will be stored on this cannot be done.
After some reading, I did find where windows icons are stored
Expand|Select|Wrap|Line Numbers
  1. ::/Windows/System32/Shell32.dll
This obviously is a dll file so I can not just open it and paste in our replacement icon then somehow add it to Access that way.
I did find some software which allows you to open the .dll and display the icons inside, which I think you can edit and also add your own, but I do not see a way to save this back as a .dll, only as a .ico.

I did not think this would be so hard.
Thanks in advance,
-Craig
Dec 6 '11 #1
10 27543
samiiix
1 New Member
you don't need to save it as dll. in the dll it is only stored which ico to use.
In fact you may use any image for a application as icon
Dec 6 '11 #2
Craig420
4 New Member
you don't need to save it as dll. in the dll it is only stored which ico to use.
In fact you may use any image for a application as icon
Yes, but how would I get the 32x32 image of our logo I created (saved as .ico) to be used as the icon for the Microsoft Access MDB file?
I dont see an option to change icon?
Only to create a shortcut then change the icon for that, but as I explained this is not possible.
Also, even if it was, my created logo is not in the selection list, only the icons stored in Shell32.dll. How would I add my 32x32.ICO file to this list?
Thanks for your reply, it is very much appreciated.
-Craig
Dec 6 '11 #3
ADezii
8,834 Recognized Expert Expert
The following will create a Shortcut on the Desktop named Test Database.lnk, pointing to the Database C:\Stuff\Test.m db, with the Icon of C:\Test\Test.ic o. The Code can easily be more portable by encapsulating it in a Sub-Routine/Function, and passing it several Arguments.
Expand|Select|Wrap|Line Numbers
  1. With CreateObject("WScript.Shell")
  2.   With .CreateShortcut(.SpecialFolders("Desktop") & "\Test Database.lnk")
  3.     .TargetPath = "C:\Stuff\Test.mdb"
  4.     .WindowStyle = 1
  5.     .Hotkey = ""
  6.     .IconLocation = "C:\Test\Test.ico, 0"
  7.     .Description = "Test Icon Substitution"
  8.     .WorkingDirectory = "C:\Stuff\"
  9.       .Save
  10.   End With
  11. End With
Dec 6 '11 #4
NeoPa
32,569 Recognized Expert Moderator MVP
Have you looked in Tools | Startup yet? There is a property there which allows you to set the icon. I've never used it myself, but I expect it's what you're after.
Dec 9 '11 #5
sierra7
446 Recognized Expert Contributor
Hi
NeoPa, if you try this you with probably find that the icon selected only appears as a tiny representation in the top LH corner of your open Access application. (In Access 2010 select File to go backstage then select Options, Current Database, Application Icon, Browse, OK, OK then restart)

When I first tried this in 2000 I had expected my Access app to display my icon in Windows Explorer. However, it seems that only .exe files , & maybe others, are interpreted this way but a good-old .mdb file is just shown with an Access 'key' icon.

My solution was to attach the icon to a desktop shortcut as has already been described.

ADezzi, I like your idea of programmaticall y creating the shortcut. I shall look to running it from my startup form. I shall need to test whether it automatically over-writes an existing shortcut or whether I need to test it exists first before attempting creation. Have you tried this?

S7
Dec 9 '11 #6
sierra7
446 Recognized Expert Contributor
ADezii,
Thanks, that works great!

No need to check one already exist either.

I'm not sure I understand the code. I did not have a reference to Windows Scripting Runtime in the Test system I used but it ran OK anyway.

Thanks again for the tip.

S7
Dec 9 '11 #7
NeoPa
32,569 Recognized Expert Moderator MVP
There are two different approaches here :
  1. Changing the icon that shows when viewing the file in Windows Explorer for instance.
  2. Changing or creating a shortcut to this database which shows a different icon.

The first is handled by the File Associations in Windows. Any such change here would necessarily pertain to all such files recognised by extension as MDB, so cannot practically be achieved.

The second can be managed by ADezii's code, but it is also possible to create and modify such shortcuts manually. To modify an existing shortcut simply select it and choose Properties (Right-click wherever it's found but Alt-Enter if selectable - for instance from Windows Explorer). When the Properties window is open (You should find yourself in the Shortcut tab.) click on Change Icon and use the following screen to choose both the file the icon is held within as well as the particular icon in that file.
Dec 9 '11 #8
ADezii
8,834 Recognized Expert Expert
Request as stated by the Original Poster [OP]:
I am aware that I could perhaps create a shortcut and change the icon for this due the nature of the dynamically remapping cluster which the Shortcut will be stored on this cannot be done.
Dec 9 '11 #9
NeoPa
32,569 Recognized Expert Moderator MVP
You're absolutely right ADezii. I must admit to finding it quite uncomfortable trying to make sense of English written without consideration for grammar and important words simply left out, but if I look at it again, it does indicate the OP is not after a manual solution. Your (clever) code is required after-all :-)
Dec 9 '11 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

5
27022
by: Eskimo Joe | last post by:
I am trying to create a desktop icon using VB6. is this possible? -p
1
3849
by: Bodi | last post by:
Hello, Could someone please tell me if there is a way, or how do I change my html/javascript so that if I drag and drop a link from a webpage to the desktop in such a way that the name of the shortcut created is not the URL of the link but the link itself? any help is greatly appreciated. e.g. if the link is <a href="http://www.microsoft.com"> MS </a>
3
377
by: Giloosh | last post by:
Hello, i have a microsoft access application and right now, anyone knowing how to use microsoft-access can easily go behind the applicatio, design the forms, delete edit/tables etc... There is basically no security on the application. My question is... how do i secure the application, preventing any access to the "back" or Source (tables,queries,forms,macros...) of the application? or even preventing getting into the design view of the...
4
4813
by: blagdam | last post by:
Is it possible to launch a functional Access 2000 db switchboard by clicking on a desktop icon? I have searched the Microsoft Knowlege Base but, apparently I'm not phrasing my search in the correct terms. Many thanks for any assistance.
2
1668
by: Rohit Chaphekar | last post by:
How do I change the icon for an application? I tried setting the Icon property but it does not seem to work. Thanks, Rohit
1
1774
by: | last post by:
I need to let the user know what state a certain property had the last time the program was run. Is there a way to have the application itself change the desktop icon used to start the program. I refer to the icon which was placed on the desktop by the install routine, which I specified when setting up the install routine. I would like to find some code to include in my main vb application which would replace this icon with one of a...
3
1590
by: MLH | last post by:
I would like to launch an A97 runtime application, doing one additional thing immediately prior to launching. Here's the Target property setting of the desktop icon I now use to launch the runtime app: "C:\Program Files\AppDir\MyApp.mde"
3
2287
by: VANWEB | last post by:
A developer gave me a Microsoft Access Application approximately 42MB that I had him design. I can open the application itself and see the Access GUI with the buttons & menu he created, but I cannot open the file in Access designer to modify the IP address from which it pulls data to run the necessary reports. Do I have the incorrect files ? Should the file extension specifically say .MDB ? When I right click the file it says the file...
0
1289
by: Steve | last post by:
After installing my application (which I developed using Visual Studio 2005) on a target desktop, the desktop icon shows the icon that is assigned to the application exe - which is what I want. When I click on the desktop icon to run the application, the icon will flip between the desired icon and a Windows default icon(file/folder?) before the application is loaded. Does anyone know why this happens?
2
1653
by: Lysander | last post by:
This is a strange one. I am running MS-Access 2003, under Windows XP and have many desktop shortcuts, used to pick up the correct mdw file. An example would be called "Champion System" and have the following property ""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" c:\champion\championCode.mdb /wrkgrp z:\champion\champion.mdw" I have never had a problem with these, but now, somehow, on 2 PCs out in India, when the user logs...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9028
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7728
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.