Download presentation
Presentation is loading. Please wait.
Published byRose Dickerson Modified over 9 years ago
1
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic 2010 5 th Edition
2
Programming with Microsoft Visual Basic 2010, 5 th Edition Lesson C Objectives 2 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 Prevent the user from sizing a form Remove and/or disable the form’s Minimize, Maximize, and Close buttons Print an application’s code and interface
3
Programming with Microsoft Visual Basic 2010, 5 th Edition Using the Timer Tool 3 Splash screens typically close automatically Do not usually contain Exit button Timer control removes splash screen Timer tool: Used to create a timer control Timer control Processes code at regular time intervals Does not appear on the user interface at run time Interval property specified in milliseconds Enabled property allows timer to run if set to True
4
Programming with Microsoft Visual Basic 2010, 5 th Edition Using the Timer Tool (cont’d.) 4 Tick event Occurs each time an interval has elapsed Condition: Timer must be running (enabled) Add code into Tick event procedure Code will be run when Tick event occurs Component tray Special area below form design area in IDE Stores controls not visible in user interface at run time
5
Programming with Microsoft Visual Basic 2010, 5 th Edition Using the Timer Tool (cont’d.) 5 Figure 1-31 Timer control placed in the component tray
6
Programming with Microsoft Visual Basic 2010, 5 th Edition Setting the FormBorderStyle Property 6 FormBorderStyle property Determines the border style of a form Example settings Sizable: Allows user to change form’s size by dragging its borders at run time FixedSingle: Fixed, thin border line None: No border
7
Programming with Microsoft Visual Basic 2010, 5 th Edition The MinimizeBox, MaximizeBox, and ControlBox Properties 7 MinimizeBox property: Determines whether Minimize button appears on form’s title bar MaximizeBox property: Determines whether Maximize button appears on form’s title bar ControlBox property: Determines whether title bar appears on form Splash screens typically do not contain title bar To remove title bar, delete contents of form’s Text property
8
Programming with Microsoft Visual Basic 2010, 5 th Edition The MinimizeBox, MaximizeBox, and ControlBox Properties (cont’d.) 8 Figure 1-33 Completed splash screen
9
Programming with Microsoft Visual Basic 2010, 5 th Edition Printing the Application’s Code and Interface 9 Print a copy of application’s code and user interface Helps you understand and maintain application To print code Code editor window must be active (current) window Print options Hide collapsed regions Include line numbers
10
Programming with Microsoft Visual Basic 2010, 5 th Edition Printing the Application’s Code and Interface (cont’d.) 10 Figure 1-34 Print dialog box
11
Programming with Microsoft Visual Basic 2010, 5 th Edition Lesson C Summary 11 Timer control processes code at specified intervals Form’s MinimizeBox and MaximizeBox properties enable or disable Minimize and Maximize buttons on form Form’s ControlBox property determines whether icon and control buttons appear in title bar Form’s BorderStyle property controls appearance of the form’s border Print Visual Basic code from Code Editor window Print user interface from designer window
12
Programming with Microsoft Visual Basic 2010, 5 th Edition Which property of a form object will remove the entire title bar? 12
13
Programming with Microsoft Visual Basic 2010, 5 th Edition Control Box 13
14
Programming with Microsoft Visual Basic 2010, 5 th Edition When using a timer control, the event named ____________________ will determine when the code is executed. 14
15
Programming with Microsoft Visual Basic 2010, 5 th Edition Tick 15
16
Programming with Microsoft Visual Basic 2010, 5 th Edition True or False: You cannot use line numbers with Visual Basic code. 16
17
Programming with Microsoft Visual Basic 2010, 5 th Edition False 17
18
Programming with Microsoft Visual Basic 2010, 5 th Edition True or False: The BorderStyle property of a form controls the appearance of the form’s border. 18
19
Programming with Microsoft Visual Basic 2010, 5 th Edition False 19
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.