Download presentation
Presentation is loading. Please wait.
Published byGervais Baldwin Modified over 6 years ago
1
Chapter 1: An Introduction to Visual Basic 2015
2
Lesson C Objectives 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 a form’s Minimize, Maximize, and Close buttons Print an application’s code and interface Programming with Microsoft Visual Basic 2015
3
Using the Timer Tool Splash screens typically close automatically
They do not usually contain an Exit button The timer control removes the 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 the timer to run if set to True Programming with Microsoft Visual Basic 2015
4
Using the Timer Tool (cont.)
Tick event Occurs each time an interval has elapsed Condition: The timer must be running (enabled) Add code to the Tick event procedure Code will be run when the Tick event occurs Component tray A special area below the form design area in the IDE Stores controls not visible in the user interface at run time Programming with Microsoft Visual Basic 2015
5
Using the Timer Tool (cont.)
Figure 1-31 Timer control placed in the component tray Programming with Microsoft Visual Basic 2015
6
Setting the 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 Programming with Microsoft Visual Basic 2015
7
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 ControlBox property Determines whether the title bar appears 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 Programming with Microsoft Visual Basic 2015
8
The MinimizeBox, MaximizeBox, and ControlBox Properties (cont.)
Figure 1-33 Completed splash screen Programming with Microsoft Visual Basic 2015
9
Printing the Application’s Code and Interface
Printing the application’s code and user interface helps you understand and maintain the application To print the code: Click the Splash Form.vb tab to make the Code Editor window the active window Click FILE on the menu bar, and then click Print to open the Print dialog box Programming with Microsoft Visual Basic 2015
10
Printing the Application’s Code and Interface (cont.)
To print the interface: Make the Designer window the active window Press the Window’s logo screen to switch to tile mode Type snipping tool, when you see Snipping Tool in the list of applications, click Snipping Tool Click the New button. Drag the cursor around the form and then release the mouse button. Click File and then click Save As. Save file as file type Portable Network Graphic file (PNG) Right-click saved PNG file and then click Print on the context menu. Programming with Microsoft Visual Basic 2015
11
Printing the Application’s Code and Interface (cont.)
Figure 1-34 Print dialog box Programming with Microsoft Visual Basic 2015
12
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 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 Print Visual Basic code from the Code Editor window Print the user interface from the designer window Programming with Microsoft Visual Basic 2015
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.