Solved

Icons and VB.net

Posted on 2009-05-04
4
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

737 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