Chapter 15 Adding Graphics and Animation Effects 383
- In the Open dialog box, navigate to the C:\Vb10sbs\Chap15 folder.
- In the Files Of Type list box, select All Files.
- Select Sun .ico, and then click Open.
- Click OK in the Select Resource dialog box.
The Sun icon appears in the PictureBox.
- Set the SizeMode property on the PictureBox to StretchImage.
- Double-click the Timer control on the Components tab of the Toolbox to add it to the
component tray below the form.
The timer object is the mechanism that controls the pace of the animation. Recall
that the timer object itself isn’t visible on the form, so it’s shown below the form in the
component tray reserved for objects that are not visible. - Set the following properties for the button, timer, and form objects.
Object Property Setting
Button1 Text “Move Up”
Button2 Text “Move Down”
Timer1 Interval 75
Form1 Text “Basic Animation”
After you set these properties, your form looks similar to this: