October 2003
Intermediate to advanced
736 pages
15h 25m
English
The .config file, dynamic properties, files in special folders, and isolated storage all provide data used to control an application's look and feel, as well as its behavior, while remaining separate from the code itself. One other major place for this kind of data for applications and controls is resources. A resource is a named piece of data bound into the EXE or DLL at build time. For example, you could set the background image of a form in your application by loading a bitmap from a file:
Public Sub New()
InitializeComponent()
Me.BackgroundImage = _
New Bitmap("C:\WINDOWS\Web\Wallpaper\Azul.jpg")
End Sub
The problem with this code, of course, is that not all installations of Windows will have Azul.jpg, and even those that have ...