Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Icons and VB.net

Posted on 2009-05-04
4
Medium Priority
?
297 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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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