Solved

Icons and VB.net

Posted on 2009-05-04
4
293 Views
Last Modified: 2013-11-08
Don't know if it is even possible.

I have an application written in VB.Net. I want to change its executable icon at runtime, from that same application. It doesn't matter if the application needs a restart.
If someone could help me change some other exe's icon through VB.net, it would help me a lot.

Thanks in advance.
0
Comment
Question by:kertkert
  • 3
4 Comments
 
LVL 15

Expert Comment

by:oobayly
ID: 24296311
You'd probably have to resort to the Win32 imports to do this, however there are some issues that you'll encounter:
Retrieving an icon from an executable is (relatively) easy, saving it back to the executable isn't something I'm familiar with.
You'll need to manipulate the main executable from a 2nd executable as the main executable will be locked while it's running.

To get yourself started you'll have to use something like ExtractIcon from shell32.dll
http://msdn.microsoft.com/en-us/library/ms646973(VS.85).aspx
0
 
LVL 1

Author Comment

by:kertkert
ID: 24297204
I just found out that somebody has asked a question pretty much like mine.
http://www.experts-exchange.com/Programming/Languages/.NET/Q_24294859.html
0
 
LVL 1

Author Comment

by:kertkert
ID: 24304735
I still haven't managed to make some progress with this, so i'll do some rephrasing:
I need to change an icon (resource) of another executable within vb.net. Possible?
0
 
LVL 1

Accepted Solution

by:
kertkert earned 0 total points
ID: 24366199
I don't need this anymore. I'll wait a few days and then delete the question if i don't get a reasonable answer.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET 2008 - Windows Protected Your PC 7 41
Tracing a live website down to the files which support it 2 25
IDE for Python 5 25
Problem to Office 1 15
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question