Introducing Procedures and CommonDialogClasses in Visual Basic .NETPre-Assessment Questions    1.   Which of them is not a...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETPre-Assessment Questions (Contd.)    3. Which   feature...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETPre-Assessment Questions (Contd.)    5. Which of the st...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET    Solutions to Pre-Assessment      Questions    •    ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETObjectives    In this lesson, you will learn to:       ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETGetting Started with Procedures    •    A procedure is ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETAn Introduction to Procedures    •    While developing ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETAn Introduction to Procedures(Contd.)    •    A procedu...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETAn Introduction to Procedures(Contd.)    •    There are...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Sub Procedures    •    A Sub procedure is a block of c...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETSub Procedures (Contd.)    •    Calling a Sub Procedure...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETFunction Procedures    •    A Function procedure is a b...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Property Procedure    •    A Property procedure is a s...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETProperty Procedure (Contd.)•    A property is defined b...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETParameter Array    •     Using a parameter array, you c...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETParameter Array (Contd.)    •    Passing Arguments for ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETProcedure Overloading and Procedure  Overriding    •   ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETProcedure Overloading and ProcedureOverriding (Contd.) ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETProcedure Overriding    •    Procedure overriding can b...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETImplementing the MsgBox() function    •    The Msgbox()...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETImplementing the MsgBox() function(Contd.)    •    Mess...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETImplementing the MsgBox() function(Contd.)    The follo...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET                Demo for   Creating Procedures in Visua...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETProblem Statement    •    Create the customer data entr...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETSolution    •    To solve the above problem you need to...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETIntroducing CommonDialog Classes    •    If you want to...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETCommonDialog Classes    •    VB.NET provides the follow...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETColorDialog Class    •    To change the background and ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETFontDialog Class    •    The default Font dialog box ca...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETFontDialog Class (Contd.)    •    Font dialog box is as...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETFileDialog Class    •    The FileDialog class is an abs...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET OpenFileDialog Class     •   If you want to invoke the...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET SaveFileDialog Class     •   If you want to invoke the...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET PrintDialog Class     •   In the Visual Basic .NET env...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET PageSetupDialog Class     •   In the Visual Basic .NET...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET PageSetupDialog Class (Contd.)     The PageSetup Dialo...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET PrintDocument Class     •   In The .NET framework prov...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus and MDI  applications     •   VB.NE...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus     •   In the Windows environment,...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus (Contd.)     •   In Context Menus  ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus (Contd.)     •   The following figu...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with MDI Applications     •   Visual Basic .NE...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET              Demo forIntegrating the Parts of an Appli...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETProblem Statement    •    Create a data entry applicati...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Solution     •   Designing the required integration.  ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET Summary     In this lesson, you learned that:     • A ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NETSummary (Contd.)   In this lesson, you learned that:   ...
Introducing Procedures and CommonDialogClasses in Visual Basic .NET  Summary (Contd.)         •   Menus are used to provid...
Upcoming SlideShare
Loading in …5
×

Vb.net session 04

1,234 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,234
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Vb.net session 04

  1. 1. Introducing Procedures and CommonDialogClasses in Visual Basic .NETPre-Assessment Questions 1. Which of them is not an advantage of using classes and objects • Maintenance of code • Encapsulation of internal complexities. • Reusabilty • Modularity 3. The methods that are used to release the instance of a class are • Destructors • Constructors • Dispose method • Finalize method ©NIIT Introduction to VB .NET Lesson 2B / Slide 1 of 27
  2. 2. Introducing Procedures and CommonDialogClasses in Visual Basic .NETPre-Assessment Questions (Contd.) 3. Which feature refers to sharing of attributes and behaviors? • Polymorphism • Encapsulation • Abstraction • Inheritance 2. Which of the following is false • Namespaces are a naming scheme. • Interfaces are not inheritable in VB .NET. • The concept of using operators or functions in different ways depending on what they are operating on is called polymorphism. • Inheritance of classes allow you to reuse code. ©NIIT Introduction to VB .NET Lesson 2B / Slide 2 of 27
  3. 3. Introducing Procedures and CommonDialogClasses in Visual Basic .NETPre-Assessment Questions (Contd.) 5. Which of the statements cannot be enclosed within the Interface and End Interface statements? • Event • Property • Function • Sub property ©NIIT Introduction to VB .NET Lesson 2B / Slide 3 of 27
  4. 4. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Solutions to Pre-Assessment Questions • d. Modularity • a. Destructors • d. Inheritance • b. • d. Sub property ©NIIT Introduction to VB .NET Lesson 2B / Slide 4 of 27
  5. 5. Introducing Procedures and CommonDialogClasses in Visual Basic .NETObjectives In this lesson, you will learn to: • Declare different types of procedures in Visual Basic .NET • Implement procedure overloading • Implement procedure overriding • Implement the MsgBox() function • Implement the CommonDialog classes • Work with Menus • Work with MDI Applications ©NIIT Introduction to VB .NET Lesson 2B / Slide 5 of 27
  6. 6. Introducing Procedures and CommonDialogClasses in Visual Basic .NETGetting Started with Procedures • A procedure is a set of one or more program statements that can be executed by referring to the procedure name. ©NIIT Introduction to VB .NET Lesson 2B / Slide 6 of 27
  7. 7. Introducing Procedures and CommonDialogClasses in Visual Basic .NETAn Introduction to Procedures • While developing an application, you may need to use the same code in multiple parts of the application. Repeating code often leads to problems in maintaining it, to avoid such situations, you can use procedures ©NIIT Introduction to VB .NET Lesson 2B / Slide 7 of 27
  8. 8. Introducing Procedures and CommonDialogClasses in Visual Basic .NETAn Introduction to Procedures(Contd.) • A procedure is a set of one or more program statements that can be executed by referring to the procedure name. • You can reuse the code written in a procedure • Procedures are useful for performing repetitive tasks, such as fetching specific records from a database, and text and control manipulation. • The use of procedures provides the following benefits: • Procedures allow you to break an application into discrete logical units, thus making the application more readable. • Procedures help in debugging an application because debugging separate units of an application is easier than debugging the application as a whole. • Procedures are reusable across programs with little or no modification. ©NIIT Introduction to VB .NET Lesson 2B / Slide 8 of 27
  9. 9. Introducing Procedures and CommonDialogClasses in Visual Basic .NETAn Introduction to Procedures(Contd.) • There are three types of procedures in Visual Basic .NET: • Sub procedures • Function procedures • Property procedures ©NIIT Introduction to VB .NET Lesson 2B / Slide 9 of 27
  10. 10. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Sub Procedures • A Sub procedure is a block of code enclosed within the Sub and End Sub statements. • The execution starts with the first executable statement after the Sub statement and ends with the first End Sub, Exit Sub, or Return statement. • A Sub procedure does not return a value. However, it can take arguments, such as constants, variables, and expressions that are passed to it by the calling code. • The access modifiers that can be used with Sub procedures are Public, Protected, Friend, Protected Friend, and Private. • Each argument can be declared for a procedure by specifying the argument name and the data type • You can pass arguments to a Sub procedure either by value or by reference ©NIIT Introduction to VB .NET Lesson 2B / Slide 10 of 27
  11. 11. Introducing Procedures and CommonDialogClasses in Visual Basic .NETSub Procedures (Contd.) • Calling a Sub Procedure • Sub procedure can be called by using the procedure name. • Sub procedures are of the following two types: • General procedures • Event-handling procedures ©NIIT Introduction to VB .NET Lesson 2B / Slide 11 of 27
  12. 12. Introducing Procedures and CommonDialogClasses in Visual Basic .NETFunction Procedures • A Function procedure is a block of code enclosed within the Function and End Function statements. • A Function procedure, unlike a Sub procedure, returns a value to the calling code. • The argument declaration for a Function procedure is similar to that for a Sub procedure. • Return Values of a Function Procedure • Return values are the values that a Function procedure sends back to the calling code. • A Function procedure uses the Return statement to specify the return value. • To trap the returned value of a Function procedure, you need to call the Function procedure by including its name and arguments on the right side of an assignment statement. ©NIIT Introduction to VB .NET Lesson 2B / Slide 12 of 27
  13. 13. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Property Procedure • A Property procedure is a set of code statements that are used to assign or retrieve the values of the properties declared within a module, a class, or a structure. • You can access properties either as Public variables or by using the Set and Get Property procedures. • There are two types of Property procedures in Visual Basic .NET. • Get procedures are used to retrieve the values from a property. • Set procedures are used to assign values to a property. ©NIIT Introduction to VB .NET Lesson 2B / Slide 13 of 27
  14. 14. Introducing Procedures and CommonDialogClasses in Visual Basic .NETProperty Procedure (Contd.)• A property is defined by a set of code enclosed within the Property and End Property statements. • For a Property procedure, an argument must be passed by value and not by reference. • A Property procedure is always invoked implicitly by the code that refers to the property. ©NIIT Introduction to VB .NET Lesson 2B / Slide 14 of 27
  15. 15. Introducing Procedures and CommonDialogClasses in Visual Basic .NETParameter Array • Using a parameter array, you can pass an array of values for an argument of a procedure. • The ParamArray keyword is used to denote a parameter array. • Rules to Follow while Using a Parameter Array • You cannot use more than one parameter array in a procedure, and it must be the last argument in the procedure definition. • The parameter array must be passed by value. You should specify the ByVal keyword. • The code within the procedure must use the parameter array as a one-dimensional array. In addition, each element of the array must be of the same data type as the data type of ParamArray. • The parameter array is optional. The default value of a parameter array is an empty one‑dimensional array. • The parameter array must be the only one optional argument in the list of arguments for a procedure. All other arguments preceding the parameter array must be assigned value. ©NIIT Introduction to VB .NET Lesson 2B / Slide 15 of 27
  16. 16. Introducing Procedures and CommonDialogClasses in Visual Basic .NETParameter Array (Contd.) • Passing Arguments for a Parameter Array Inheritance • While calling a procedure, you can pass the following arguments for a parameter array: • An array that has the same element type as the parameter array. • A list of an indefinite number of arguments. The arguments are separated by commas. ©NIIT Introduction to VB .NET Lesson 2B / Slide 16 of 27
  17. 17. Introducing Procedures and CommonDialogClasses in Visual Basic .NETProcedure Overloading and Procedure Overriding • Procedure overloading is defining multiple procedures using the same name but different argument lists. An interface defines properties, methods, and events. • When you overload a procedure: • Each overloaded version uses the same procedure name. • Each overloaded version differs from all the other overloaded versions in one of the following ways: • The number of arguments • The order of arguments ©NIIT Introduction to VB .NET Lesson 2B / Slide 17 of 27
  18. 18. Introducing Procedures and CommonDialogClasses in Visual Basic .NETProcedure Overloading and ProcedureOverriding (Contd.) • You cannot overload a procedure by varying only one or more of the following items: • The procedure modifiers, such as Public, Shared, and Static. • The argument names • The argument modifiers, such as ByRef and Optional • The data type of the return value ©NIIT Introduction to VB .NET Lesson 2B / Slide 18 of 27
  19. 19. Introducing Procedures and CommonDialogClasses in Visual Basic .NETProcedure Overriding • Procedure overriding can be performed in Visual Basic .NET application. • You need to keep in mind the following rules while implementing overriding of procedures: • You can override procedures that are declared with the Overridable keyword in the base class. • You need to explicitly declare a procedure in the base class with the Overridable keyword in order to override it in the derived class. This is because procedures are not Overridable by default. • Overridden procedures need to have the same arguments as the inherited members from the base class. • The redefined implementation of a procedure in the derived class can call the implementation defined in the parent class by specifying MyBase keyword before the procedure name. ©NIIT Introduction to VB .NET Lesson 2B / Slide 19 of 27
  20. 20. Introducing Procedures and CommonDialogClasses in Visual Basic .NETImplementing the MsgBox() function • The Msgbox() function is one of the built-in functions in Visual Basic .NET and allows you to display messages in a dialog box. • The Msgbox() function takes three arguments of which the first is a required argument and the last two are optional. The arguments are as follows: • Prompt -It contains a string expression that is to be displayed as the message in the dialog box. • Buttons – It contains a numeric expression that is the sum of the values specifying the number and type of buttons to display, the icon style to use, and the identity of the default button. • Title – It contains a string expression that is displayed as the title in the title bar of the dialog box. ©NIIT Introduction to VB .NET Lesson 2B / Slide 20 of 27
  21. 21. Introducing Procedures and CommonDialogClasses in Visual Basic .NETImplementing the MsgBox() function(Contd.) • MessageBox Class • The MessageBox class can be used to display informative messages to users. ©NIIT Introduction to VB .NET Lesson 2B / Slide 21 of 27
  22. 22. Introducing Procedures and CommonDialogClasses in Visual Basic .NETImplementing the MsgBox() function(Contd.) The following example illustrates the use of the MessageBox class to display a message: Message Box With Icon MessageBox.Show("The entered data is not valid. Please enter valid data.", "Data Entry Error",MessageBoxButtons.OK, MessageBoxIcon.Error) Message Box With Icon   ©NIIT Introduction to VB .NET Lesson 2B / Slide 22 of 27
  23. 23. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Demo for Creating Procedures in Visual Basic .NET ©NIIT Introduction to VB .NET Lesson 2B / Slide 23 of 27
  24. 24. Introducing Procedures and CommonDialogClasses in Visual Basic .NETProblem Statement • Create the customer data entry that was created in the previous session to accept the details of the customer such as CustomerID, First Name, Last Name, Address, Telephone number and E-mail Id. The application needs to include options to check for a valid customer ID and telephone number. The customer ID should start with the letter C and have four digits after it. The telephone number should consist of only digits (no alphabets). The form should also have the facility to display error messages when incorrect data is entered. ©NIIT Introduction to VB .NET Lesson 2B / Slide 24 of 27
  25. 25. Introducing Procedures and CommonDialogClasses in Visual Basic .NETSolution • To solve the above problem you need to perform the following steps: • Adding controls to the form. • Checking of data and displaying an error message. • Saving and executing the application. ©NIIT Introduction to VB .NET Lesson 2B / Slide 25 of 27
  26. 26. Introducing Procedures and CommonDialogClasses in Visual Basic .NETIntroducing CommonDialog Classes • If you want to access the default Font dialog box to change the font of text or use the Open dialog box to open a file and display the contents, you need to use the inherited classes of the CommonDialog class. • All the classes that inherit from the CommonDialog class override the RunDialog() function to create a specific common dialog box. • The classes that are inherited from the CommonDialog class are ColorDialog, FontDialog, FileDialog, PrintDialog, and PageSetupDialog. ©NIIT Introduction to VB .NET Lesson 2B / Slide 26 of 27
  27. 27. Introducing Procedures and CommonDialogClasses in Visual Basic .NETCommonDialog Classes • VB.NET provides the following types of common dialog classes: • ColorDialog class • OpenFileDialog class • SaveFileDialog class • PrintDialog class ©NIIT Introduction to VB .NET Lesson 2B / Slide 27 of 27
  28. 28. Introducing Procedures and CommonDialogClasses in Visual Basic .NETColorDialog Class • To change the background and the foreground color of text, you can use the default Color dialog box. • To use the default Color dialog box, you can either add a ColorDialog control to the form or create an instance of the inherited ColorDialog class. • The ColorDialog Class is as shown below: ©NIIT Introduction to VB .NET Lesson 2B / Slide 28 of 27
  29. 29. Introducing Procedures and CommonDialogClasses in Visual Basic .NETFontDialog Class • The default Font dialog box can be used to change the font, the font style, and the size of text. • To use the default Font dialog box, you can either add the FontDialog control to the form or instantiate the FontDialog class. ©NIIT Introduction to VB .NET Lesson 2B / Slide 29 of 27
  30. 30. Introducing Procedures and CommonDialogClasses in Visual Basic .NETFontDialog Class (Contd.) • Font dialog box is as shown below. The Font Dialog Box The Font Dialog Box ©NIIT Introduction to VB .NET Lesson 2B / Slide 30 of 27
  31. 31. Introducing Procedures and CommonDialogClasses in Visual Basic .NETFileDialog Class • The FileDialog class is an abstract class that is inherited from the CommonDialog class. • Since the FileDialog class is an abstract class, you cannot instantiate it directly. • The OpenFileDialog and SaveFileDialog classes are inherited from the FileDialog class. ©NIIT Introduction to VB .NET Lesson 2B / Slide 31 of 27
  32. 32. Introducing Procedures and CommonDialogClasses in Visual Basic .NET OpenFileDialog Class • If you want to invoke the default Open dialog box to open a file in the Visual Basic .NET environment, you either need to add an OpenFileDialog control to the form or instantiate the OpenFileDialog class. • The Open dialog box is as shown below ©NIIT Introduction to VB .NET Lesson 2B / Slide 32 of 27
  33. 33. Introducing Procedures and CommonDialogClasses in Visual Basic .NET SaveFileDialog Class • If you want to invoke the default Save As dialog box to overwrite an existing file or create a new file using the Visual Basic .NET environment, you either need to add a SaveFileDialog control to the form or instantiate the SaveFileDialog class. • Save As dialog box is as shown below ©NIIT Introduction to VB .NET Lesson 2B / Slide 33 of 27
  34. 34. Introducing Procedures and CommonDialogClasses in Visual Basic .NET PrintDialog Class • In the Visual Basic .NET environment, you can use the default Print dialog box to print any text or graphics. • To invoke the default Print dialog box, you need to either add a PrintDialog control and a PrintDocument control to the form or create an instance of the PrintDialog and PrintDocument classes. • PrintDialog box is as shown below ©NIIT Introduction to VB .NET Lesson 2B / Slide 34 of 27
  35. 35. Introducing Procedures and CommonDialogClasses in Visual Basic .NET PageSetupDialog Class • In the Visual Basic .NET environment, you can use the default Windows Page Setup dialog box to set the page details for printing in Windows applications. • To invoke the default Windows Page Setup dialog box, you need to either add a PrintSetupDialog control to the form or create an instance of the PrintSetupDialog class. ©NIIT Introduction to VB .NET Lesson 2B / Slide 35 of 27
  36. 36. Introducing Procedures and CommonDialogClasses in Visual Basic .NET PageSetupDialog Class (Contd.) The PageSetup Dialog Box is as shown below ©NIIT Introduction to VB .NET Lesson 2B / Slide 36 of 27
  37. 37. Introducing Procedures and CommonDialogClasses in Visual Basic .NET PrintDocument Class • In The .NET framework provides the PrintDocument class to support printing .NET applications. • Following are the two ways of using the PrintDocument class in an .NET application: • Add the PrintDocument object to the form, from the toolbox at the design time. • Declare an instance of the PrintDocument class at run time. ©NIIT Introduction to VB .NET Lesson 2B / Slide 37 of 27
  38. 38. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus and MDI applications • VB.NET provides support to create menus and MDI applications • You can also display multiple forms at the same time. This functionality is called MDI. ©NIIT Introduction to VB .NET Lesson 2B / Slide 38 of 27
  39. 39. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus • In the Windows environment, you can use menus to enhance the user interface of an application. • Menus Appearing on the Menu Bar • The menus that appear on the menu bar contain a list of options that a user can use for various requirements.For example, in a word processing application, the File menu has options, such as Open, Save, and Close • In Visual Basic .NET, the menus that appear on the menu bar are created using the MainMenu object. Declare an instance of the PrintDocument class at run time. ©NIIT Introduction to VB .NET Lesson 2B / Slide 39 of 27
  40. 40. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus (Contd.) • In Context Menus • Visual Basic .NET supports the creation of context menus to provide users easy access to related options. • Context menu items can also be added to a form either at design time or at run time • When you add a MainMenu control or a ContextMenu control from the Toolbox, the control is added to the Component tray, which appears at the bottom of the form. ©NIIT Introduction to VB .NET Lesson 2B / Slide 40 of 27
  41. 41. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with Menus (Contd.) • The following figure displays the Component tray that holds a MainMenu control and a ContextMenu control. ©NIIT Introduction to VB .NET Lesson 2B / Slide 41 of 27
  42. 42. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Working with MDI Applications • Visual Basic .NET supports Multiple Document Interface (MDI) applications. • When an application supports multiple windows simultaneously, it is called an MDI application. • In Visual Basic .NET, an MDI application consists of two parts, MDI parent form and MDI child form. ©NIIT Introduction to VB .NET Lesson 2B / Slide 42 of 27
  43. 43. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Demo forIntegrating the Parts of an Application ©NIIT Introduction to VB .NET Lesson 2B / Slide 43 of 27
  44. 44. Introducing Procedures and CommonDialogClasses in Visual Basic .NETProblem Statement • Create a data entry application. This application should enable users to access multiple data entry forms. To allow easy access to different data entry forms, the data entry application should provide a user-friendly interface. It should also allow users to access the monthly sales report for data analysis. In addition, the users should be able to exit the data entry application when required. The forms that the users should be able to access are Customer Details form, Employee Details form, and Order Details form. ©NIIT Introduction to VB .NET Lesson 2B / Slide 44 of 27
  45. 45. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Solution • Designing the required integration. • Integrate the application. • Saving and executing the application ©NIIT Introduction to VB .NET Lesson 2B / Slide 45 of 27
  46. 46. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Summary In this lesson, you learned that: • A procedure is a set of one or more program statements that can be executed by referring to the procedure name. • Procedures are of three types: • Sub • Function • Property • Sub procedures can be of two types: • General • Event-handling • Property procedures are of two types: • Get procedures are used to retrieve values from a property. • Set procedures are used to assign values to a property. ©NIIT Introduction to VB .NET Lesson 2B / Slide 46 of 27
  47. 47. Introducing Procedures and CommonDialogClasses in Visual Basic .NETSummary (Contd.) In this lesson, you learned that: • Property procedures are used to access properties declared within a module, a class, or a structure. • Arguments can be passed to a procedure either by value or by reference. • Parameter arrays enable you to pass an array of values as an argument to a procedure. • Procedure overloading is defining multiple procedures having the same name but different argument lists. • Procedure overriding enables you to redefine a base class procedure in a derived class without changing the name of the procedure. • The CommonDialog class is the base class for the most commonly used dialog boxes, such as, Font, File, Print, and Page Setup. • MDI applications enable you to integrate different parts of an application. ©NIIT Introduction to VB .NET Lesson 2B / Slide 47 of 27
  48. 48. Introducing Procedures and CommonDialogClasses in Visual Basic .NET Summary (Contd.) • Menus are used to provide a user-friendly interface for accessing options. • Context menus enable users to access the most frequently used options. ©NIIT Introduction to VB .NET

×