Trouble with icons

juggernot

Well-known member
Joined
Sep 28, 2006
Messages
173
Programming Experience
Beginner
I'd like to tell my program to look for an icon in an area where, currently, there is none. After the user installs the program, there will be one there, but before hand that file doesn't exist. All my attempts to set the icon manually (In the Code) has failed. I noticed that the following code is automatically setup for me in Windows Form Designer Generated Code:
VB.NET:
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)

Could someone help me out with this?
 
When ever you use visual studio form designer to set the icon or image (in case of picture box), the image or the icon is automatically added to the resource file. To view the resource file click on the "show all files" in the solution explorer and then try to open the [formname].resx file.
 
Funny.. I see "Resources" as a separate item in my solution explorer.. Go look at the project properties and you should see your resources
 
Back
Top