Visual RPG 9.0  

Resources Page, Project Designer [Visual RPG]

The Resources page of the Project Designer hosts an instance of the Resource Designer that stores and maintains resources in a single location (Resources.resx).

Items that you add to the project using the Resource Designer are placed in the Resources directory for your project. The designer information is stored in Resources.resx

You can edit file based resources by double-clicking the resource in the designer. The designer opens the item in the default editor for that file type. If no editor is registered for that file type, the file is opened in the Windows default application for that type.

Strongly-typed resources encapsulate access to resources by creating classes that contain a set of static, read-only (get) properties at compile time. You can consume resources using the "get" properties rather than using the GetString and GetObject methods of the ResourceManager class. Strongly-typed resources also make it easier to develop localizable applications.

All new resources are linked resources by default, as opposed to embedded. If you try to edit an embedded resource, you will receive a message prompting you to convert the item to a linked resource in order to edit it; conversion is recommended but optional.

To access the Resources page, select a project node in Solution Explorer, then on the Project menu, click Properties. When the Project Designer appears, click the Settings tab.

Resource View Selector

To view a project's resources by type, at the top-left corner of the Resources page, click the arrow and choose a resource type from the drop-down list. The choices are Strings, Images, Icons, Audio, Files, and Other. Strings is the default view.

Strings (Ctrl+1)

Displays strings in a grid with columns for the Name, Value, and Comment of the string resource.

Images (Ctrl+2)

Displays all image files, including .bmp, .jpg, and .gif formats. These files are exposed at run time as Bitmap. This category also includes Windows metafiles, exposed as Metafile.

Icons (Ctrl+3)

Displays icon (*.ico) files, which are exposed as Icon.

Audio (Ctrl+4)

Displays sound files, including .wav, .wma, and .mp3 files. These files are exposed as byte arrays. Double-clicking an audio item opens and plays it in Windows Media Player.

Files (Ctrl+5)

Displays any files that do not fit into the above categories. Items in this view can be text files exposed as String, or binary files exposed as byte arrays.

Other (Ctrl+6)

Displays a settings grid for adding other types that support string serialization (for example, Font, Enum, Color, and Point). The grid contains the following columns: Name, Type, Value, and Comment. For a description of the columns in this grid, see "Settings Grid," below.

Add Resource and Remove Resource Buttons

These controls allow you add and delete resources.  Click on button for dropdown choices.

Add Resource

Select an item from the Add Resource drop-down list at the top of the page to add resources. The options are Add Existing File, Add New String, New Image (PNG, BMP, GIF, JPEG, or TIFF format), Add New Icon, and Add New Text File.

Remove Resource

Select an existing resource in the settings grid (described below) and click Remove Resource to delete it.

View Button

The settings grid is used to configure settings for each string resource. This grid appears only in the Strings view and in the Other view.

View in List 

Enter the name of the resource in this field.

View Details 

Specify a type that supports string serialization. (This column appears only in the Other view.)

View as Thumbnails 

The value associated with the resource setting. For example, if the resource is a string, you would enter its text value here.

Comment

An optional comment describing the string resource. You can view this only at design time.

See Also

Setting Project Designer Properties