Page #120 (Placing a Bitmap Picture on the Picture Box)

 

Overview

The Microsoft IDE (integrated development environment) presents an efficient set of tools to create windows visually. Every now and then, however, something goes wrong within the file set and the programmer is forced into damage control mode. This chapter is a brief discussion on damage control.

Does losing controls sound silly? Suppose you want to move a label (by highlighting it to place its properties in the Properties window, moving to the bottom of the properties list, and resetting the label location) from (50, 100) to (100, 100). However, as you type the location you enter (1000, 100). You meant to move the label 50 pixels to the right, but you inadvertently moved it 950 pixels to the right. The label disappears from the screen template in the IDE. What should you do?

To aid in this discussion, open project LostControls in Visual Studio 2005\Projects\DemosSourceCode in the IDE. The main window looks like Figure 29-1.

image from book
Figure 29-1: Lost Controls window

The panel has a fixed single border, which is chosen at the time the panel is created.

 


Unlocking Microsoft C# V 2.0 Programming Secrets
Unlocking Microsoft C# V 2.0 Programming Secrets (Wordware Applications Library)
ISBN: 1556220979
EAN: 2147483647
Year: 2005
Pages: 129

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