Creating the Inherited Form
To explain how to create an inherited form. Creating an inherited form is simple. After you have designed your base form and built the solution, you are ready to begin deriving forms. To do this, you simply add a new item to the project by clicking Inherited Form in the Add New Item window. This will run the Inheritance Picker for you. When inheriting from a base Windows Form, consider the following guidelines carefully Ensure that the base form is as complete as possible. Make any last minute...
Using the MyBase Keyword
Refers to the Immediate Base Class Can Only Access Public, Protected, or Friend Members of Base Class Is Not a Real Object Cannot Be Stored in a Variable Public Class DerivedClass Inherits BaseClass Public Overrides Sub OverrideMethod MsgBox Derived OverrideMethod MyBase.OverrideMethod End Sub End Class You can use the MyBase keyword to access the immediate base class from which a derived class is inheriting. When using MyBase, you should be aware of some limitations It refers only to the...
Achieving Polymorphism
To explain how to use polymorphism in Visual Basic .NET. Visual Basic .NET combines a traditional use of interfaces- to create polymorphism- with the new class inheritance features. Many classes provide the same property or method A caller does not need to know the type of class the object is based on Class implements members of interface Same approach as in Visual Basic 6.0 Derived class overrides members of base class The code shown in the student notes is demonstrated immediately after this...
JustinTime Activation
When just-in-time JIT activation is enabled, an object is automatically instantiated when a method is called on a serviced component activation , and then automatically deactivated when the method is complete deactivation . When this optio n is enabled, an object does not maintain state across method calls, and this increases the performance and scalability of the application. You can override the Activate and Deactivate methods inherited from the ServicedComponent class to perform custom...
Demonstrations
This section provides demonstration procedures that will not fit in the margin notes or are not appropriate for the student notes. Creating a Visual Basic .NET Project 1. Create a new project and point out the various project templates available when creating a Visual Basic .NET project. Remind students of the general purpose of each template. 2. Create a Windows application project named SimpleProject in the install folder DemoCode Mod02 SimpleProject folder. 1. Examine the current project...
Creating a Serviced Component
To examine the object pooling application 1. Open Microsoft Visual Studio .NET. 2. Open the ObjectPoolingComponent.sln project in the install folder DemoCode Mod09 ObjectPoolingComponent folder. 3. View the code for the Pooling class, particularly noting the Imports statement, class-level attributes, and the purpose of each class member. 4. View the code for the NoPooling class, and point out that the class is almost identical to the Pooling class, except that it does not use object pooling....
Using Object Pooling
Object Pooling Allows Objects to Be Created in Advance ObjectPooling Attribute Specifies MinPoolSize and MaxPoolSize ServicedComponent Provides CanBePooled Method lt ObjectPooling Enabled True, MinPoolSize 5, MaxPoolSize 50 gt _ Public Class Account Public Overrides Function CanBePooled As Boolean To examine how components can use object pooling. Various attributes and interfaces enable Visual Basic .NET components to use object pooling._ In Visual Basic .NET, you use the ObjectPooling...
Practice Deriving Classes from Use Cases 1
To practice deriving classes and attributes from use cases. This practice allows you to work in pairs to derive some classes and attributes from a use case description. Students will work in pairs and then discuss the outcome as a group. While there should not be too many variations in the answers, you should expect different interpretations and be able to explain why a given student answer is correct or incorrect. Expected answers are given in the Instructor Notes for this module. In this...
CheckedListBox
The CheckedListBox control allows you to use a list box with check boxes beside each item. This is a commonly used control in Windows and was previously available through the Style property of a standard ListBox. The following example shows how you can use the Checkedltems property to access the selected items in the list For intTotalChecked 0 To CheckedListBoxl.Checkedltems.Count - 1 .ToString Next
Creating a Windows Installer Project
In this exercise, you will create a Windows Installer project for a client application. This will include the merge module that you created in the previous lab. You will create shortcuts for the application on the desktop and Programs menu and include a ReadMe file in the distribution. 2. On the File menu, point to Open, and then click Project. 3. Browse to the folder, click Customers.sln, and then click Open. 4. In Solution Explorer, right-click Customers, and then click Add Reference. 5....
Materials and Preparation Xka
This section provides the materials and preparation tasks that you need to teach this module. To teach this module, you need the following materials Microsoft PowerPoint file 2373A_08.ppt Module 8, Using ADO .NET Lab 8.1, Creating Applications That Use ADO .NET Read all of the materials for this module. Read the instructor notes and the margin notes for the module. Practice the demonstrations.
Module 3 Language and Syntax Enhancements
Demonstration Using Variables and Data Functions, Subroutines, and Properties 21 Lab 3.1 Working with Variables and Exception Handling 36 Demonstration Structured Exception This course is based on the prerelease version Beta 2 of Microsoft Visual Studio .NET Enterprise Edition. Content in the final release of the course may be different from the content included in this prerelease version. All labs in the course are to be completed with the Beta 2 version of Visual Studio .NETEnterprise...
Creating a Setup Project
To explain how to create a setup project. You can use the New Project dialog box to select a project template for your setup project._ You can use the Setup Project and Web Setup Project templates to create Windows Installer packages for Windows-based and Web-based applications, respectively. You specify which of these project types you want to use when you create a new project in Visual Studio .NET. You can also use the Setup Wizard to lead you through the process of gathering the necessary...



