You liquidated her, eh? Very resourceful...
Long time, no blog. What can I say? I've been to the "Happiest Place On Earth"
But, now that I'm back, here's a neat little trick that I learned about how to embed and use graphic resources in a Visual Studio .NET application. For my example, I'm assuming that I have an icon file named "Test.ico".
But, now that I'm back, here's a neat little trick that I learned about how to embed and use graphic resources in a Visual Studio .NET application. For my example, I'm assuming that I have an icon file named "Test.ico".
- Using visual studio or another tool, you can create a bitmap, jpeg, gif, or Icon.
- Put that file in the same directory as the rest of your project.
- Then Add the file to the project (Add Existing Item...) and add the file.
- Change the Build Action of the file to be "Embedded Resource"
- When you want to use the file, simply add the following code (or something similar):
Dim _icon as Icon = New Icon(Me.GetType(),"Test.ico")
Now you have a real icon that can be used for any number of things (application icon, status icon, etc.)
Comments