Image Resources

I l @ ve RuBoard

So far, we have dealt with string resources but, like Win32 programs, .NET applications store images in resources for icons, backgrounds, and other things. Ultimately, the images get stored in the compiled .resource form, but, when you create them in Visual Studio or by hand, they are converted to the XML-based .resx form. Obviously, editing an image file as text in XML form is going to be no fun at all. The prescribed method for placing images in the resources is with the tools, such as VS.NET, provided by Microsoft.

A component, for example, might have an image as a background. You would place the component on the form and edit the component's background image property. The editor will allow you to select an image that is then placed into the resource for you. Figure 3.4.4 shows an image used on a form in this way.

Figure 3.4.4. Placing a background image on a form.

graphics/0304fig04.gif

I l @ ve RuBoard


C# and the .NET Framework. The C++ Perspective
C# and the .NET Framework
ISBN: 067232153X
EAN: 2147483647
Year: 2001
Pages: 204

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net