Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs,...
-
Upload
baldwin-robbins -
Category
Documents
-
view
223 -
download
1
Transcript of Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs,...
![Page 1: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/1.jpg)
Visual Basic .NETComprehensive Concepts
and Techniques
Chapter 7
Using Menus, Common Dialogs, Procedures, Functions, and Arrays
![Page 2: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/2.jpg)
2Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Objectives
• Add a menu bar and menus to an application using the MainMenu control
• Add a shortcut menu to an application using the ContextMenu control
• Use the StatusBar control in an application• Use the PictureBox control in an
application• Use common dialog boxes in an
application to interact with the user
![Page 3: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/3.jpg)
3Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Objectives
• Use one-dimensional and multidimensional arrays in code
• Write a function procedure to return a value
• Write a sub procedure
• Write code to pass arguments to function and sub procedures
![Page 4: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/4.jpg)
4Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Objectives
• Describe the two methods for passing arguments to functions and procedures
• Create an enhanced message box with the MessageBox.Show() method
• Use a collection of controls to access properties and methods in code
![Page 5: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/5.jpg)
5Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
![Page 6: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/6.jpg)
6Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
![Page 7: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/7.jpg)
7Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Creating the User Interface
• Open a New Project named Know Your Dogs Quiz in the Chapter7 folder on your Data Disk
• Set the following properties for your form
![Page 8: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/8.jpg)
8Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Adding Controls
• Add a StatusBar control by dragging the StatusBar button from the Toolbox window to the bottom of the Form1 form
• Add one PictureBox, one GroupBox, four RadioButtons inside the GroupBox, and two Buttons
• Add a ContextMenu control• Add a FontDialog control• Set the control properties as they appear in table
7-4 on pages VB 7.19 – VB 7.21
![Page 9: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/9.jpg)
9Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Creating Menus on a Menu Bar
• Click the MainMenu1 control in the Component Tray
• Click the Type Here indicator in the Menu Designer. Type &File as the Text property value to create the File menu on the menu bar, and press the ENTER key
• Set the Name property for the File menu item as indicated in Table 7-6 on page VB 7.24
• Click the Type Here indicator below the File menu item in the Menu Designer. Type E&xit as the Text property value
![Page 10: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/10.jpg)
10Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Creating Menus on a Menu Bar
• Create the remaining menus and menu items as shown in Table 7-6 on page VB 7.24
• To add a Separator Bar, right-click the area in the Menu Designer you want the Separator Bar to appear, and select Insert Separator from the shortcut menu
• Adding an ampersand (&) before a letter in the Text property of a menu designates that letter as a keyboard shortcut key
• Rename the MainMenu control to mnuMain
![Page 11: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/11.jpg)
11Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Creating a Shortcut Menu for a Form• Click the ContextMenu1 control in the Component
Tray• Click the Context Menu indicator. When the Type
Here indicator appears, add the menu items appearing in Table 7-7 on page VB 7.30
• To insert a Separator Bar, type a dash (-) for the menu item
• Select the ContextMenu1 control in the Component Tray and set the control’s Name property value to cmuShortcut
• Select the Form1 form. Set the ContextMenu property in the Properties window to cmuShortcut
![Page 12: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/12.jpg)
12Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
The StatusBar
![Page 13: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/13.jpg)
13Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Changing the Properties of a StatusBar Control• Click the StatusBar1 control on the Form1
form. Change the Name property to stbQuestion. Select the Panels property in the Properties window and then click the Panels property ellipsis button
• Click the Add button. When the StatusBarPanel1 panel is added, select the AutoSize property and then click the AutoSize box arrow
![Page 14: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/14.jpg)
14Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Changing the Properties of a StatusBar Control• Click the Spring property
value and then click the OK button. When the StatusBarPanel Collection Editor window closes, select the ShowPanels property in the Properties window and change the ShowPanels property to True
![Page 15: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/15.jpg)
15Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
The PictureBox
• Commonly used properties of the PictureBox control
![Page 16: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/16.jpg)
16Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Changing the Properties of a PictureBox Control• Click the PictureBox1 control and set the
properties in the properties window to those specified below
![Page 17: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/17.jpg)
17Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
![Page 18: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/18.jpg)
18Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Common Dialog Controls
• Windows applications often share requirements for certain types of input
• Applications use similar dialog boxes to open, print, preview, or save a file
• ShowDialog() method
![Page 19: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/19.jpg)
19Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
FontDialog Control Properties
![Page 20: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/20.jpg)
20Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Changing the Properties of a FontDialog Control• Click the FontDialog1 control and change
the property values listed below
![Page 21: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/21.jpg)
21Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Arrays
• Allows programmers to represent many values with one variable name
• Elements in the array are distinguished by their subscript
![Page 22: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/22.jpg)
22Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
The Dim Statement for Arrays
![Page 23: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/23.jpg)
23Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Dynamic Dimensioning of Arrays
• Has a variable or expression for its upper-bound value
• Visual Basic .NET permits the size of an array in a Dim statement to be written as a simple variable
• Dim intCode(gintSize) As Integer
![Page 24: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/24.jpg)
24Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Declaring Arrays
• Right-Click the Form1 form in the Solution Explorer. Click the View Code command
• Enter Option Strict On as the first line of code in the code window
• Enter the code below, starting on line 320
![Page 25: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/25.jpg)
25Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Indexes
• Elements in an array are referenced in code by their index
![Page 26: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/26.jpg)
26Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Function Procedures
• Performs tasks and returns a value back to the code that called it
• Similar to VB.NET’s intrinsic functions
• Function statements declare function procedures– Private Function
InventoryCounts() As Integer()
• Common Statements in Functions– Return statement– Exit Function statement– End Function statement
![Page 27: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/27.jpg)
27Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Declaring a Function Procedure and Using Arrays in Code• Enter the code below, starting on line 333
![Page 28: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/28.jpg)
28Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Coding the Menu Command and Using the FontDialog Control in Code
• Click the Form1.vb tab in the main work area. Double-click the Exit command on the File menu of the Form1 form
• Type line 345 (shown on the next slide) in the code window
• Click the Design tab in the main work area, double-click the Font command on the Options menu, and type lines 349 through 355 shown on the next slide
![Page 29: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/29.jpg)
29Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
![Page 30: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/30.jpg)
30Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Multidimensional Arrays
![Page 31: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/31.jpg)
31Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Declaring a Two-Dimensional Array
• Enter lines 331 through 339 as shown below
_
![Page 32: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/32.jpg)
32Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Array Methods
![Page 33: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/33.jpg)
33Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Declaring Sub Procedures
![Page 34: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/34.jpg)
34Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Passing Arguments Between Procedures• Passing By Value method
– ByVal keyword– Passes the value of the variable (default method)– CalculateTax((dblIncome), intTaxBracket)
• Passing By Reference method– ByRef keyword– Passes the reference location of the variable– Allows you to modify the variable– Private Sub CalculateTax(ByRef dblValue As Double)
![Page 35: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/35.jpg)
35Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Coding a Sub Procedure
![Page 36: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/36.jpg)
36Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Coding a Sub Procedure
• Enter line 342 as shown below, and press ENTER• Enter lines 343 through 366 as shown below
![Page 37: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/37.jpg)
37Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Enhanced MessageBox Features
![Page 38: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/38.jpg)
38Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Using an Array and an Enhanced Message Box
![Page 39: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/39.jpg)
39Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Coding an Array Method and Enhanced MessageBox• Enter lines 367 through 385 as shown
below
![Page 40: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/40.jpg)
40Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Using a Control Collection
![Page 41: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/41.jpg)
41Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Using a Control Collection
• Enter lines 386 through 403 as shown below
![Page 42: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/42.jpg)
42Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Calling a Sub Procedure
• Code the five event procedures as shown on the following slide– Form1_Load– mnuFirst_Click– mnuLast_Click– mnuNext_Click– mnuPrevious_Click
![Page 43: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/43.jpg)
43Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
![Page 44: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/44.jpg)
44Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Using the PerformClick() Method
• Used when you want to execute the Click event procedure for a control
• Ensures visual effects are handled, in addition to calling the Click event procedure
• Best used when several event procedures perform duplicate actions
• Enter the code on the following slide for the seven event procedures shown
![Page 45: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/45.jpg)
45Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
![Page 46: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/46.jpg)
46Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Finish the Project
• Click the Save All button on the Standard toolbar
• Test your project by taking the Know Your Dogs quiz. Test the MainMenu and the ContextMenu
• Print your program’s documentation
• Quit Visual Basic .NET
![Page 47: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/47.jpg)
47Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Summary
• Add a menu bar and menus to an application using the MainMenu control
• Add a shortcut menu to an application using the ContextMenu control
• Use the StatusBar control in an application• Use the PictureBox control in an
application• Use common dialog boxes in an
application to interact with the user
![Page 48: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/48.jpg)
48Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Summary
• Use one-dimensional and multidimensional arrays in code
• Write a function procedure to return a value
• Write a sub procedure
• Write code to pass arguments to function and sub procedures
![Page 49: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/49.jpg)
49Chapter 7: Using Menus, Common Dialogs, Procedures, Functions, and Arrays
Summary
• Describe the two methods for passing arguments to functions and procedures
• Create an enhanced message box with the MessageBox.Show() method
• Use a collection of controls to access properties and methods in code
![Page 50: Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.](https://reader030.fdocuments.net/reader030/viewer/2022032607/56649ec75503460f94bd3160/html5/thumbnails/50.jpg)
Visual Basic .NETComprehensive Concepts
and Techniques
Chapter 7 Complete