3. After studying Lesson C, you should
be able to:
• Set the properties of a timer control
• Delete a control from the form
• Delete code from the Code Editor window
• Code a timer control’s Tick event procedure
3
4. After studying Lesson C, you should
be able to:
• Prevent the user from sizing a form
• Remove and/or disable a form’s Minimize,
Maximize, and Close buttons
• Print an application’s code and interface
4
5. Using the Timer Tool
â—Ź Splash screens typically close automatically
â—‹ They do not usually contain an Exit button
â—‹ Use a timer control to close the splash screen
â—Ź Timer tool
â—‹ Used to create a timer control
5
6. Using the Timer Tool (cont.)
â—Ź Timer control
â—‹ Processes code at regular time intervals
â—‹ Does not appear on the user interface at run
time
â—‹ Important properties
6
7. Using the Timer Tool (cont.)
â—Ź Interval property
â—‹ Specified in milliseconds
â—Ź Enabled property
â—‹ Allows the timer to run if set to True
7
8. Using the Timer Tool (cont.)
â—Ź Tick event
â—‹ Occurs each time a timer interval has elapsed
â—‹ Condition: The timer must enabled
â—Ź Add code to the Tick event procedure
â—‹ Code will be run when the Tick event occurs
8
9. Using the Timer Tool (cont.)
â—Ź Component tray
â—‹ A special area below the form design area in
the IDE
â—‹ Stores controls not visible in the user
interface at run time
9
11. FormBorderStyle Property of a Form
â—Ź FormBorderStyle Property
â—‹ Determines the border style of a form
â—Ź Example settings:
○ Sizable: Allows the user to change a form’s size by dragging
its borders at run time
â—‹ FixedSingle: A fixed, thin border line
â—‹ None: No border
11
12. The MinimizeBox, MaximizeBox, and
ControlBox Properties
â—Ź MinimizeBox property
â—‹ Determines whether the Minimize button
appears on the form’s title bar
â—Ź MaximizeBox property
â—‹ Determines whether the Maximize button
appears on the form’s title bar
12
13. â—Ź ControlBox property
â—‹ Determines if the title bar elements appear on
the form
â—Ź Splash screens typically do not contain a title bar
â—‹ To remove a title bar, delete the contents of
the form’s Text property
13
15. Lesson C, Summary
â—Ź The timer control processes code at specified
intervals.
● A form’s MinimizeBox and MaximizeBox
properties enable or disable the Minimize and
Maximize buttons on the form.
15
16. Lesson C, Summary (cont.)
● A form’s ControlBox property determines
whether the icon and control buttons appear in
the title bar.
● A form’s FormBorderStyle property controls
the appearance of the form’s border.
16