Solved

Icons and VB.net

Posted on 2009-05-04
4
284 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now