COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using...
-
Upload
sharyl-mckinney -
Category
Documents
-
view
217 -
download
1
Transcript of COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using...
![Page 1: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/1.jpg)
COMPUTER PROGRAMMING ISUMMER 2011
Objective 8.02 Apply Procedures to Create Picture Boxes using Images.
(5%)
![Page 2: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/2.jpg)
Objective/Essential Standard
Essential Standard8.00 Apply procedures to develop graphics applications
Indicator8.02 Apply Procedures to Create Picture Boxes Using Images. (5%)
![Page 3: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/3.jpg)
COMPUTER PROGRAMMING 1
Adding Images
![Page 4: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/4.jpg)
Adding Images to Your Project
1. In the Solution Explorer, double-click My Project
2. The following is displayed.
![Page 5: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/5.jpg)
Adding Images to Your Project
3. Select the Resources tab.4. Go to the Strings tab
click the drop-down arrow. Select Images
5. Go to the Add Resource tab click the drop-down arrow.
6. To add an existing image, select Add Existing.To create and add an image, select New Image, then the image type.
![Page 6: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/6.jpg)
COMPUTER PROGRAMMING 1
The PictureBox Control
![Page 7: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/7.jpg)
PictureBox Control
The PictureBox control displays an image.
The image can be one of the following formats. Bitmap GIF JPEG
Best use Enhanced Metafile Icon
![Page 8: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/8.jpg)
Adding A PictureBox Control
Click the PictureBox control in the ToolBox.Draw the rectangular picture box on your
form.Set the Properties.
![Page 9: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/9.jpg)
PictureBox Control
PictureBox Properties Description
(Name) The name of a PictureBox should start with pic
Image Sets the image to display in the PictureBox
SizeMode
Normal (Default) StretchImage AutoSize CenterImage Zoom
Controls the image sizing and position
places in the top-left corner of the Picture Boxresizes the image to fit the PictureBoxresizes the PictureBox to fit the imageputs the image in the middle of the PictureBoxresizes the image to fit the PictureBox but maintains the original ratio
PictureBox Event Description
Click Occurs when the user clicks the PictureBox
![Page 10: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/10.jpg)
Adding Images to the PictureBox Control
Select the PictureBoxClick in the Image property area
The Ellipsis displays.
The Select Resource dialog displays
![Page 11: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/11.jpg)
Adding Images to the PictureBox Control
![Page 12: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/12.jpg)
Adding Images to the PictureBox Control
Your image will be added to the list.
![Page 13: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/13.jpg)
Using the PictureBox
You can set the Image property during runtime
Me.PictureBox.Image = My.Resources.ImgName
Example
![Page 14: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/14.jpg)
Changing How the Image Displays
Remember the SizeMode property of the PictureBox will change how the image is displayed.
To change how the image is displayed at runtime, you can change the SizeMode property.
Me.PictureBox.SizeMode = PictureBoxSizeMode.SizeModeValue
Where the SizeModeValue is one of the choices given: Normal (Default), StretchImage , AutoSize, CenterImage, Zoom
![Page 15: COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.02 Apply Procedures to Create Picture Boxes using Images. (5%)](https://reader036.fdocuments.us/reader036/viewer/2022062422/56649f275503460f94c3fe61/html5/thumbnails/15.jpg)
Conclusion
This PowerPoint provided an overview of the PictureBox control in Visual Basic.
For more information:http://msdn.microsoft.com/en-us/library/5b4t5f7s.aspx