Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Wed Apr 18, 2007 5:00 am Post subject: HOWTO : Embed Win32 resources (.RES file) in managed assemblies |
|
|
1. Create a .RC file.
The .RC file is a textual file which specifies the resources (icons,bitmaps,etc) that will be contained in the Win32 .RES file that will created in Step 2. The .RC file can created directly using a text editor or using Visual C++ or any other resource creator.
2. Compile the .RC file to a .RES file using rc.exe
The rc.exe is the resource compiler which compiles the .RC file into a binary Win32 .RES file.
3. Embed the .RES file in the managed assembly
In Visual Studio 2002 or Visual Studio 2003, you must embed the .RES file in the managed assembly using the /win32res (C#) or /win32resoruce (VB.Net) command-line compiler options. In Visual Studio 2005, you can specify the .RES file through the 'Project Settings' dialog. Click on the 'Applications' tab in the 'Project Settings' dialog, click the 'Resource File' radio button and specify the .RES file in the text box. |
|