Compiling your own resource file editor (Reseditor.exe)

Source: Internet
Author: User
Tags reflection resource visual studio
Compilation vs.net2003 itself with a resource file editing software, but the default is not compiled, can not be used. Here's how I've compiled this tool:

1. Find the ResEditor directory. Generally in "
Program Files\Microsoft Visual Studio. NET 2003\sdk\v1.1\samples\tutorials\resourcesandlocalization\reseditor "

Only BUILD.bat batch files are available in the 2.reseditor directory. There are no csc.exe files required for the C # source program to be compiled. One of the stupidest ways I've used it is to copy all the files I need into this directory. The documentation needed for the C # source program is as follows:
Csc.exe
Cscomp.dll
Cscompui.dll

3. Copy the above files to the ResEditor directory and run Build.exe. The system will be reborn as a reseditor.exe executable file in the current directory. Double-click ResEditor is not see what you want ^.^.


To read a picture in a resource file in a program:
If there is a welcom field in the resource file myrs.resources, the value is a picture. In the program to read this picture can be written like this:
1. Import Resources,reflection two namespaces in the program header
Imports System.Resources
Imports System.Reflection
2. In Solution Explorer, right-click the current solution Select Add "Add Existing Item" in the pop-up menu to join the myrs.resources resource file. Make sure Myrs.resources is an "embedded resource"
3. Write this in the program:
Dim Mypic as New PictureBox
Dim RDRs as ResourceManager
Rdrs=new ResourceManager ("your solution. Myrs.resources", Me.GetType (). Assembly)
Mypic. Image=ctype (Rs. GetObject ("welcom"), Image)
4. Press F5 to run.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.