O'Reilly logo

Windows Forms 2.0 Programming by Michael Weinhardt, Chris Sells

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13. Resources

A RESOURCE IS A NAMED PIECE OF DATA that is bound to an assembly at build time.[1] Resources are an extremely useful way to bundle arbitrary data such as text, graphics, and sounds into your applications and components for use at run time in tasks as diverse as setting the background image on a form and setting the label of a button. And because applications and components can find themselves being used in countries other than those in which they were written, resources also serve as the building block for internationalization to support no-compile deployment of localized resources.

Resource Basics

Imagine setting the background image of a form by loading a bitmap from a file:

// MainForm.csnamespace ResourcesSample {  partial class MainForm : Form { ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required