Download presentation
Presentation is loading. Please wait.
Published byLee Crawford Modified over 9 years ago
1
The PictureBox Control Prefix Prefix – pic Image Property PictureBox Image Property – Changes the image or file that appears inside of the PictureBox SizeMode SizeMode – can be set to either Normal. StretchImage, AutoSize, or CenterImage Visible Visible – Can be set to either True or False. Size Size – is the picture box size in pixels.
2
PictureBox cont… A click event procedure can be coded for the picturebox. Images for a project should be copied to the bin folder located in the project folder. Image The image in a picturebox can be changed at run time by using the Image class in a statement similar to: Me.picNameofImage.Image = Image.FromFile(“NameofFile.bmp”) FromFile() The FromFile() method in the Image class creates and image object.
3
Timer Prefix Prefix – tmr Interval Interval – is the amount of time that passes before the Tick event procedure is executed. Interval is specified in milliseconds between 0 and 64,767 where 1,000 equals 1 second. Enabled Enabled – is set to True to allow a Tick event to occur at the end of each interval.
4
Timer Event Procedure A Tick event procedure is coded for each timer object added to an application. A Tick event occurs after the time specified in the Interval property elapses. For example, if the Interval is set to 1000, then a Tick event occurs every second. Start() Start() – starts a timer and can be used instead of the Enabled property. Timer.Start() Stop() Stop() – stops a timer. Timer.Stop()
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.