Viewing and Editing Resources in a Resource Editor

Each resource type has a Resource editor specific to that resource type. You can rearrange, resize, add controls and features, or otherwise modify aspects of a resource using the associated editor. You can also edit a resource in text format and binary format.

Some resource types are individual files that can be imported and used in various ways; these include bitmaps, icons, cursors, toolbars, and html files. Such resources have file names as well as resource identifiers. Others, such as dialogs, menus, and string tables in Win32 projects, exist only as part of a resource script (.rc) file or resource template (.rct) file.

Note

Properties of a resource can be modified using the Properties window.

Win32 Resources

You can access Win32 resources in the Resource View pane.

To view a Win32 resource in a resource editor

  1. Select Resource View from the View menu.

  2. If the Resource View window is not the top-most window, click the Resource View tab to bring it to the top.

  3. From Resource View, expand the folder for the project that contains resources you want to view. For example, if you want to view a dialog resource, expand the Dialog folder.

    Note

    If your project doesn't already contain an .rc file, please see Creating a New Resource Script File.

  4. Double-click the resource, for example, IDD_ABOUTBOX.

    The resource opens in the appropriate editor. For example, for dialog resources, the resource opens inside the Dialog editor.

    You can also view resources in an .rc (resource script) file without having a project open.

To delete an existing Win 32 resource

  1. In Resource View, expand the node for a resource type.

  2. Right-click on the resource you want to delete and choose Delete from the shortcut menu.

    Note

    You can delete a resource using the same shortcut menu command when you have the .rc file open in a document window outside a project.

Resources in Managed Projects

Because managed projects do not use resource script files, you must open your resources from Solution Explorer. You can use the Image editor and the Binary editor to work with resource files in managed projects. Any managed resources you want to edit must be linked resources. The Visual Studio resource editors do not support editing embedded resources.

For information on adding resources to managed projects, please see Resources in Applications in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resources strings to properties, see Walkthrough: Localizing Windows Forms and Walkthrough: Using Resources for Localization with ASP.NET.

To view a managed resource in a resource editor

  • In Solution Explorer, double-click the resource, for example, Bitmap1.bmp.

    The resource opens in the appropriate editor.

To delete an existing managed resource

  • In Solution Explorer, right-click the resource you want to delete and choose Delete from the shortcut menu.

Requirements

None

See Also

Reference

Resource Editors