the picturebox control prefix prefix – pic image property picturebox image property – changes...
TRANSCRIPT
The PictureBox ControlThe PictureBox Control
• Prefix Prefix – pic
• Image PropertyImage Property – Changes the image or file that appears inside of the PictureBoxPictureBox
• SizeModeSizeMode – can be set to either Normal. StretchImage, AutoSize, or CenterImage
• VisibleVisible – Can be set to either True or False.
• SizeSize – is the picture box size in pixels.
PictureBox cont…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.
• The image in a picturebox can be changed at run time by using the ImageImage class in a statement similar to:Me.picNameofImage.Image = Image.FromFile(“NameofFile.bmp”)
• The FromFile()FromFile() method in the Image class creates and image object.
TimerTimer
• PrefixPrefix – tmr
• IntervalInterval – 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.
• EnabledEnabled – is set to True to allow a Tick event to occur at the end of each interval.
Timer Event ProcedureTimer 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()