Database Reference
In-Depth Information
Try It: Displaying Stored Images
To display your stored images, follow these steps:
1. Select the Text and Binary Data project, right-click, and choose Add
Windows Form. From the opened dialog, make sure Windows Form is
selected, and rename Form1.cs to DisplayImages.cs ; click OK to add this form
to the Text and Binary Data project.
2. Select the DisplayImages form, and set the Size property's Width to 330 and
Height to 332.
3. Drag a Label control to the form, and position it toward the top-left corner of
the form. Select this Label control, navigate to the Properties window, and set
the following properties:
Set the Name property to lblImageName.
For the Location property, set X to 12 and Y to 22.
For the Text property, set to Image Name.
4. Drag a TextBox control to the form, and position it next to the Label control.
Select this TextBox control, navigate to the Properties window, and set the
following properties:
Set the Name property to txtImageName.
For the Location property, set X to 85 and Y to 22.
Leave the Text property blank.
5. Drag a Button control to the form, and position it next to the TextBox control.
Select this Button control, navigate to the Properties window, and set the
following properties:
Set the Name property to btnShowImage.
For the Location property, set X to 277 and Y to 22.
Set the Text property to Show Image.
6. Drag a PictureBox control to the form, and position it toward the center of the
form. Select this PictureBox control, navigate to the Properties window, and
set the following properties:
Set the Name property to ptbImage.
For the Location property, set X to 44 and Y to 61.
For the Size property, set Height to 220 and Width to 221.
7. Now your DisplayImages form in the Design view should look like Figure 17-4.
 
Search WWH ::




Custom Search