Microsoft Visual Basic 2010 Step by Step eBook
393 Chapter 16 Inheriting Forms and Creating Base Classes After completing this chapter, you will be able to: n Use the Inherita ...
394 Part III Designing the User Interface System.Windows.Forms.Form class for its definition and default values. In fact, this c ...
Chapter 16 Inheriting Forms and Creating Base Classes 395 Now you’ll practice inheriting the form. The first step in this proces ...
396 Part III Designing the User Interface As usual, Visual Studio lists all the possible templates you could include in your pro ...
Chapter 16 Inheriting Forms and Creating Base Classes 397 Now you’ll add a few new elements to the inherited form. Customize the ...
398 Part III Designing the User Interface Enlarge the form. This works just fine. And in addition to modifying the size, you c ...
Chapter 16 Inheriting Forms and Creating Base Classes 399 Click OK. The inherited form runs the event procedure that it inheri ...
400 Part III Designing the User Interface The Button3_Click event procedure that you added is also a member of the new class. Bu ...
Chapter 16 Inheriting Forms and Creating Base Classes 401 Adding a New Class to Your Project Simply stated, a class in Visual Ba ...
402 Part III Designing the User Interface Your form looks something like this: This is the basic user interface for a form that ...
Chapter 16 Inheriting Forms and Creating Base Classes 403 The Add New Item dialog box gives you the opportunity to name your cla ...
404 Part III Designing the User Interface class variables private—in other words, not available for inspection outside the class ...
Chapter 16 Inheriting Forms and Creating Base Classes 405 documentation often shows these Get and Set code blocks when discussin ...
406 Part III Designing the User Interface To create a method in the class that performs a specific action, you add a function or ...
Chapter 16 Inheriting Forms and Creating Base Classes 407 Step 4: Create an object based on the new class Click the Form1 .vb i ...
408 Part III Designing the User Interface Your form looks similar to this: Click the Display Record button. Your program store ...
Chapter 16 Inheriting Forms and Creating Base Classes 409 or methods to the derived (child) class to distinguish it from the bas ...
410 Part III Designing the User Interface Modify the Button1_Click event procedure as follows. (The shaded lines are the ones t ...
Chapter 16 Inheriting Forms and Creating Base Classes 411 Click Display Record. Your program stores the first name and last na ...
412 Part III Designing the User Interface Chapter 16 Quick Reference To Do This Inherit an existing form’s interface and functio ...
«
17
18
19
20
21
22
23
24
25
26
»
Free download pdf