Introduction |
|
1 | (1) |
|
|
1 | (1) |
|
What is Covered in This Book? |
|
|
2 | (2) |
|
The 80:20 Principle for Coverage of Topics |
|
|
4 | (1) |
|
What You Need to Use This Book |
|
|
4 | (1) |
|
|
5 | (1) |
|
Customer Support and Feedback |
|
|
6 | (5) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (4) |
|
|
11 | (18) |
|
|
12 | (9) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
14 | (1) |
|
Application Sewer Requirements |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
16 | (3) |
|
|
19 | (1) |
|
Installing and Configuring the Samples |
|
|
19 | (1) |
|
|
20 | (1) |
|
Running the Samples from other Machines |
|
|
20 | (1) |
|
Configuring a Remote IIS Server |
|
|
21 | (1) |
|
Getting Started with Hello World |
|
|
21 | (5) |
|
|
26 | (3) |
|
Introduction to the .NET Framework |
|
|
29 | (32) |
|
|
30 | (6) |
|
A Broad and Deep Platform for the Future |
|
|
30 | (1) |
|
The Role of the .NET Enterprise Servers |
|
|
31 | (1) |
|
What's Wrong with DNA and COM? |
|
|
32 | (1) |
|
Difficulty In Integrating Internet Technologies |
|
|
32 | (1) |
|
|
33 | (1) |
|
Poor Cross-language Integration |
|
|
33 | (1) |
|
Many Skills Required for Development |
|
|
33 | (1) |
|
Weaknesses in Visual Bask in COM/DNA applications |
|
|
33 | (1) |
|
|
34 | (1) |
|
An Overview of the .NET Framework |
|
|
35 | (1) |
|
A Common Substrate for all Development |
|
|
35 | (1) |
|
The Common Language Runtime |
|
|
36 | (13) |
|
|
37 | (1) |
|
Simpler, Faster Development |
|
|
37 | (1) |
|
Automatic Handling of System-Level Tasks |
|
|
37 | (1) |
|
|
38 | (1) |
|
Simpler, Safer Deployment |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
39 | (2) |
|
Multiple Language Integration and Support |
|
|
41 | (1) |
|
|
41 | (1) |
|
Reference Types vs. Value Types |
|
|
41 | (2) |
|
|
43 | (1) |
|
Primitive Types in the .NET Framework |
|
|
43 | (1) |
|
|
44 | (1) |
|
The Structure of a .NET Application |
|
|
45 | (1) |
|
Start with an Assembly, Build Up to an Application |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
47 | (1) |
|
Details on .NET Memory Management |
|
|
47 | (1) |
|
Managed vs. Unmanaged Code |
|
|
48 | (1) |
|
The Next Layer - the .NET Class Framework |
|
|
49 | (2) |
|
What is in the .NET Class Framework? |
|
|
49 | (2) |
|
User and Program Interfaces |
|
|
51 | (3) |
|
|
51 | (1) |
|
Client Applications Versus Browser-Based Applications |
|
|
51 | (1) |
|
|
52 | (1) |
|
|
52 | (1) |
|
|
53 | (1) |
|
|
53 | (1) |
|
XML as the .NET 'Meta-language' |
|
|
54 | (1) |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
55 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
The First Step - Visual Studio .NET |
|
|
56 | (1) |
|
.NET Drives Changes in Visual Basic |
|
|
57 | (1) |
|
|
57 | (2) |
|
A Spectrum of Programming Models |
|
|
58 | (1) |
|
Reducing Barriers to Internet Development |
|
|
58 | (1) |
|
Libraries of Pre-Written Functionality |
|
|
59 | (1) |
|
|
59 | (1) |
|
|
59 | (2) |
|
|
61 | (34) |
|
A Tour of the Hello World Program |
|
|
62 | (10) |
|
Form Declaration, Initialization, and Termination |
|
|
62 | (1) |
|
|
62 | (2) |
|
Forms Created by Inheritance |
|
|
64 | (1) |
|
Windows Form Designer-Generated Code |
|
|
65 | (1) |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
67 | (1) |
|
|
68 | (1) |
|
The InitializeComponent() Method |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
70 | (1) |
|
|
71 | (1) |
|
|
71 | (1) |
|
|
72 | (19) |
|
|
72 | (1) |
|
|
73 | (2) |
|
|
75 | (1) |
|
|
75 | (2) |
|
|
77 | (3) |
|
|
80 | (1) |
|
|
80 | (3) |
|
|
83 | (1) |
|
|
84 | (2) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
91 | (1) |
|
|
91 | (1) |
|
Watch and Value Display Windows |
|
|
91 | (1) |
|
|
91 | (4) |
|
|
95 | (42) |
|
|
96 | (5) |
|
|
97 | (1) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
99 | (1) |
|
|
99 | (1) |
|
Setting the Root Namespace |
|
|
99 | (1) |
|
|
100 | (1) |
|
The Microsoft.VisualBasic Namespace |
|
|
100 | (1) |
|
Language and Syntax Changes |
|
|
101 | (31) |
|
|
101 | (1) |
|
|
102 | (1) |
|
Integer Type Changes (Byte, Short, Integer, Long) |
|
|
103 | (1) |
|
|
103 | (1) |
|
Replacing Currency with Decimal |
|
|
104 | (1) |
|
|
104 | (1) |
|
|
104 | (2) |
|
Replacing Variant with Object |
|
|
106 | (1) |
|
|
107 | (1) |
|
Changes in Declaration of Variables |
|
|
107 | (1) |
|
Declaring Multiple Variables |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
108 | (1) |
|
|
108 | (1) |
|
|
109 | (1) |
|
|
109 | (1) |
|
|
109 | (1) |
|
|
110 | (1) |
|
|
110 | (1) |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
111 | (1) |
|
Changes to User-Defined Types |
|
|
112 | (1) |
|
|
112 | (1) |
|
|
113 | (1) |
|
The System.Collections Namespace |
|
|
113 | (1) |
|
Creating Custom Collections |
|
|
114 | (2) |
|
|
116 | (1) |
|
Short-Circuited If...Then Statements |
|
|
116 | (1) |
|
Using Reserved Words as Procedure Names |
|
|
117 | (1) |
|
|
117 | (1) |
|
Changes to Property Routines |
|
|
118 | (1) |
|
|
119 | (1) |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
120 | (1) |
|
Structured Error Handling |
|
|
120 | (1) |
|
The Try...Catch...Finally Structure |
|
|
121 | (1) |
|
Catch Statement Variations |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
123 | (1) |
|
Converting from On Error Goto |
|
|
123 | (2) |
|
Converting from On Error Resume Next |
|
|
125 | (1) |
|
Changes to Procedure Syntax |
|
|
126 | (1) |
|
Parentheses Required on Procedure Calls |
|
|
126 | (1) |
|
ByVal Default for all Parameters |
|
|
126 | (1) |
|
Optional Parameters Require a Default Value |
|
|
127 | (1) |
|
|
128 | (1) |
|
Changes to Event Handling |
|
|
129 | (1) |
|
|
129 | (1) |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
131 | (1) |
|
Depreciated, Obsolete, and Unsupported VB Syntax |
|
|
131 | (1) |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
132 | (2) |
|
|
134 | (1) |
|
|
135 | (2) |
|
Windows User Interface Capabilities |
|
|
137 | (50) |
|
The Importance of Windows Forms |
|
|
138 | (1) |
|
|
139 | (1) |
|
Architecture of Windows Forms |
|
|
140 | (2) |
|
Consistency with Web Forms |
|
|
142 | (1) |
|
Comparing Windows Forms to VB6 Forms |
|
|
142 | (8) |
|
Using the Visual Designer for Windows Forms |
|
|
143 | (1) |
|
Invisible Controls go In the Component Tray |
|
|
143 | (1) |
|
Not All Controls Have to be Locked |
|
|
144 | (1) |
|
Form Properties for Cancel and Default Buttons |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
145 | (1) |
|
|
145 | (1) |
|
BringToFront() and SendToBack() Methods |
|
|
145 | (1) |
|
New Layout Properties for Forms |
|
|
145 | (1) |
|
Resizing Multiple Controls |
|
|
146 | (1) |
|
Differences in Dialog Boxes |
|
|
146 | (2) |
|
ShowDialog Instead of Show vbModal |
|
|
148 | (1) |
|
|
148 | (2) |
|
New Capabilities of Windows Forms |
|
|
150 | (3) |
|
Changing the Shape of the Form |
|
|
150 | (1) |
|
New Properties to Change a Form's Appearance |
|
|
151 | (1) |
|
|
151 | (1) |
|
The TransparencyKey Property |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
153 | (1) |
|
TopMost Property of Forms |
|
|
153 | (1) |
|
Controls in Windows Forms |
|
|
153 | (4) |
|
New Properties of Controls |
|
|
154 | (1) |
|
|
154 | (2) |
|
Accessibility Properties of Controls |
|
|
156 | (1) |
|
|
156 | (1) |
|
Adding New Controls at Run-Time |
|
|
156 | (1) |
|
Summary of Important Controls |
|
|
157 | (13) |
|
|
158 | (1) |
|
|
158 | (4) |
|
|
162 | (1) |
|
UpDown Controls - DomainUpDown and NumericUpDown |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
164 | (1) |
|
Panel and GroupBox Container Controls |
|
|
164 | (1) |
|
|
165 | (1) |
|
Extender Provider Controls |
|
|
166 | (1) |
|
Working with Provider Controls in Code |
|
|
167 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
Changes to Existing Controls |
|
|
168 | (1) |
|
Renamed Properties of Controls |
|
|
169 | (1) |
|
|
169 | (1) |
|
Image Control no Longer Exists |
|
|
169 | (1) |
|
New Capabilities for Existing Controls |
|
|
169 | (1) |
|
|
169 | (1) |
|
Multiple Document Interface (MDI) Forms |
|
|
170 | (3) |
|
Creating an MDI Parent Form |
|
|
170 | (1) |
|
Differences in MDI Parent Forms |
|
|
170 | (1) |
|
Differences in MDI Child Forms |
|
|
171 | (1) |
|
Arranging Child Windows in the MDI Parent |
|
|
171 | (1) |
|
An MDI Example in Visual Basic .NET |
|
|
171 | (2) |
|
Inheritance in Windows Forms |
|
|
173 | (3) |
|
|
174 | (2) |
|
|
176 | (6) |
|
|
177 | (1) |
|
System.Drawing.Graphics Class |
|
|
177 | (1) |
|
Using GDI+ Capabilities in a Windows Form |
|
|
178 | (3) |
|
|
181 | (1) |
|
|
181 | (1) |
|
System.Drawing.Text Namespace |
|
|
181 | (1) |
|
Changes from VB6 and Earlier |
|
|
182 | (1) |
|
Creating Custom Windows Forms Controls |
|
|
182 | (3) |
|
Inheriting from an Existing Control |
|
|
183 | (1) |
|
Step-by-Step Process to Create the Control |
|
|
183 | (1) |
|
|
184 | (1) |
|
Basing a New Control on the Control Class |
|
|
185 | (1) |
|
|
185 | (2) |
|
New Object-Oriented Capabilities |
|
|
187 | (54) |
|
What is Object Orientation? |
|
|
188 | (1) |
|
The Relationship of Objects to Components |
|
|
188 | (1) |
|
Visual Basic .NET 00 Implementation |
|
|
189 | (47) |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
193 | (2) |
|
|
195 | (2) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
198 | (4) |
|
|
202 | (2) |
|
|
204 | (1) |
|
Object Declaration and Instantiation |
|
|
204 | (2) |
|
|
206 | (1) |
|
|
207 | (2) |
|
|
209 | (1) |
|
|
209 | (1) |
|
|
210 | (2) |
|
|
212 | (1) |
|
|
212 | (2) |
|
|
214 | (2) |
|
|
216 | (1) |
|
|
217 | (1) |
|
Overloading Base Class Methods in Subclasses |
|
|
218 | (1) |
|
Overriding Base Class Methods |
|
|
219 | (7) |
|
Overriding the Constructor Method |
|
|
226 | (1) |
|
|
226 | (3) |
|
Abstract Base Classes and Methods |
|
|
229 | (2) |
|
The Effect of Inheritance on Events |
|
|
231 | (2) |
|
|
233 | (1) |
|
|
233 | (1) |
|
Implementing an Interface |
|
|
234 | (1) |
|
Implementing Multiple Interfaces |
|
|
235 | (1) |
|
Cross-Language Inheritance |
|
|
236 | (3) |
|
Creating the Visual Basic .NET Base Class |
|
|
236 | (1) |
|
|
237 | (1) |
|
Creating a Client Application |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
239 | (2) |
|
|
241 | (40) |
|
Why Replace Active Server Pages? |
|
|
242 | (1) |
|
|
243 | (12) |
|
|
244 | (4) |
|
|
248 | (1) |
|
ASP.NET as the Runtime Engine |
|
|
248 | (1) |
|
|
248 | (1) |
|
|
249 | (1) |
|
The Template for Presentation |
|
|
249 | (1) |
|
|
250 | (1) |
|
A Subclassed Instance of the Page Class |
|
|
250 | (1) |
|
|
251 | (1) |
|
Postback vs. Non-Postback Events |
|
|
252 | (1) |
|
|
252 | (1) |
|
Built-in Events are Limited |
|
|
252 | (1) |
|
Application and Session Events |
|
|
253 | (1) |
|
State Management and the Life Cycle of a Web Forms Page |
|
|
253 | (1) |
|
Disabling State Management |
|
|
254 | (1) |
|
|
255 | (1) |
|
|
256 | (7) |
|
Why Are Server Controls Needed? |
|
|
256 | (1) |
|
|
257 | (1) |
|
|
258 | (1) |
|
How to Use Validation Controls |
|
|
259 | (1) |
|
Summary of Available Validation Controls |
|
|
259 | (1) |
|
|
259 | (1) |
|
Laying Out Error Messages on the Page |
|
|
260 | (1) |
|
|
260 | (1) |
|
Custom Web Form Server Controls |
|
|
260 | (3) |
|
Differences for Extending an Existing Web Control |
|
|
263 | (1) |
|
Data Binding in Web Forms |
|
|
263 | (1) |
|
A Final Example - A Small Application Using Web Forms |
|
|
264 | (4) |
|
Configuring Your Application with Web.config |
|
|
268 | (3) |
|
Securing an ASP.NET Web Site |
|
|
269 | (1) |
|
|
270 | (1) |
|
|
271 | (7) |
|
What are Web Services Used For? |
|
|
271 | (1) |
|
Understanding the SOAP Protocol |
|
|
272 | (1) |
|
Creating a Web Service in Visual Basic .NET |
|
|
273 | (2) |
|
Consuming a Web Service in Visual Basic .NET |
|
|
275 | (1) |
|
Creating and Consuming a Web Service |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
278 | (3) |
|
|
281 | (52) |
|
|
282 | (1) |
|
ADO.NET Demands New Architectures |
|
|
283 | (1) |
|
ADO.NET - Important Concepts |
|
|
283 | (4) |
|
Location of the ADO.NET classes |
|
|
284 | (1) |
|
|
284 | (1) |
|
|
284 | (1) |
|
Data Flow Overview for a DataSet |
|
|
285 | (2) |
|
Data Providers for Connected Operations |
|
|
287 | (10) |
|
Providers Included with .NET |
|
|
287 | (1) |
|
|
288 | (1) |
|
The SQL Server Data Provider |
|
|
288 | (1) |
|
Classes Implemented by Data Providers |
|
|
288 | (1) |
|
Working With Data Provider Classes Using Wizards |
|
|
289 | (1) |
|
Combining Classes From Different Data Providers |
|
|
289 | (1) |
|
Working With Data Providers in Code |
|
|
290 | (1) |
|
|
290 | |
|
|
211 | (82) |
|
|
293 | (2) |
|
|
295 | (2) |
|
How the ADO.NET Classes Work Together |
|
|
297 | (1) |
|
|
298 | (8) |
|
|
299 | (1) |
|
|
300 | (1) |
|
|
301 | (1) |
|
|
301 | (1) |
|
Examining Different Versions of Data in a Row |
|
|
302 | (1) |
|
|
303 | (1) |
|
|
304 | (1) |
|
Using DataRelations for Master-Detail Data |
|
|
305 | (1) |
|
|
306 | (11) |
|
Adding Rows to a DataTable |
|
|
306 | (1) |
|
Finding a Particular Row in a DataTable |
|
|
307 | (1) |
|
Deleting Rows from a DataTable |
|
|
307 | (1) |
|
Creating a DataSet Manually |
|
|
308 | (1) |
|
Creating a DataSet Using the DataAdapter Wizard |
|
|
309 | (1) |
|
|
310 | (5) |
|
|
315 | (2) |
|
|
317 | (2) |
|
Getting a Subset of Data into a DataView |
|
|
317 | (1) |
|
|
318 | (1) |
|
|
319 | (2) |
|
Using Stored Procedures in ADO.NET |
|
|
321 | (2) |
|
Stored Procedures with Command Classes |
|
|
321 | (1) |
|
Using Stored Procedures With DataAdapters |
|
|
322 | (1) |
|
Exception Classes for ADO.NET |
|
|
323 | (1) |
|
|
324 | (2) |
|
Data Binding with Listboxes and Combo Boxes |
|
|
324 | (1) |
|
Data Binding to a Collection of Objects |
|
|
325 | (1) |
|
Data Binding to any Property |
|
|
326 | (1) |
|
Accessing XML through ADO.NET |
|
|
326 | (2) |
|
Saving Changes to the Data |
|
|
327 | (1) |
|
Persisting a DataSet in XML |
|
|
328 | (1) |
|
Accessing XML through the DOM |
|
|
328 | (1) |
|
|
326 | (3) |
|
Some General Guidelines for Using ADO.NET |
|
|
329 | (1) |
|
|
329 | (1) |
|
|
329 | (1) |
|
Changes to the Business Tier with ADO.NET |
|
|
330 | (1) |
|
When Is Classic ADO Still Needed? |
|
|
330 | (1) |
|
|
330 | (1) |
|
Applications that Need Server-Side Cursors |
|
|
331 | (1) |
|
|
331 | (2) |
|
|
333 | (65) |
|
|
334 | (23) |
|
|
334 | (2) |
|
Rules for Remote Access to Objects |
|
|
336 | (3) |
|
|
339 | (10) |
|
|
349 | (1) |
|
|
349 | (4) |
|
Us Microsoft Message Queue (MSMQ) |
|
|
353 | (1) |
|
The System.Messaging Namespace |
|
|
353 | (4) |
|
|
357 | (15) |
|
|
357 | (5) |
|
|
362 | (1) |
|
Interacting with the Current Thread |
|
|
362 | (2) |
|
|
364 | (1) |
|
|
365 | (7) |
|
|
372 | (3) |
|
Use of the System.Console Namespace |
|
|
373 | (2) |
|
|
375 | (7) |
|
PrintDocument and Related Objects |
|
|
375 | (1) |
|
|
376 | (1) |
|
|
376 | (1) |
|
|
377 | (1) |
|
|
377 | (3) |
|
Invoking the Print Dialog |
|
|
380 | (1) |
|
Involving the Page Dialog |
|
|
381 | (1) |
|
Creating a Windows NT/2K Service with VB |
|
|
382 | (6) |
|
Creating a Windows Service |
|
|
382 | (1) |
|
The Windows Service Project |
|
|
382 | (1) |
|
Writing to the Application Log |
|
|
383 | (1) |
|
|
384 | (1) |
|
|
385 | (3) |
|
Monitoring the File System |
|
|
388 | (2) |
|
|
390 | (7) |
|
vbc Command Line Parameters |
|
|
390 | (1) |
|
Description of Tools in the bin Directory |
|
|
391 | (1) |
|
Configuration and Deployment Tools and Utilities |
|
|
392 | (1) |
|
Windows Forms Design Tools and Utilities |
|
|
393 | (1) |
|
Security Tools and Utilities |
|
|
393 | (1) |
|
General Tools and Utilities |
|
|
394 | (3) |
|
Installation and Deployment |
|
|
397 | (1) |
|
|
398 | (31) |
|
The .NET Framework Redistributable |
|
|
399 | (1) |
|
|
400 | (1) |
|
|
400 | (5) |
|
|
401 | (2) |
|
|
403 | (2) |
|
|
405 | (9) |
|
Creating a Test Application |
|
|
405 | (1) |
|
|
406 | (4) |
|
Running the Setup Program |
|
|
410 | (1) |
|
|
411 | (1) |
|
Creating a Test Application |
|
|
411 | (1) |
|
|
412 | (1) |
|
Running the Setup Program |
|
|
413 | (1) |
|
|
414 | (12) |
|
Launching a .NET Program from a URL |
|
|
415 | (1) |
|
Creating the NetRun Application |
|
|
416 | (1) |
|
|
417 | (1) |
|
Adding NetRun to the Path |
|
|
418 | (1) |
|
Creating a Windows Shortcut |
|
|
418 | (1) |
|
|
419 | (1) |
|
Creating the Shell Application |
|
|
419 | (3) |
|
|
422 | (1) |
|
|
423 | (3) |
|
|
426 | (3) |
|
Interoperability and Migration |
|
|
429 | (28) |
|
COM/DCOM Interoperability |
|
|
430 | (16) |
|
Invoking COM Components From .NET |
|
|
430 | (1) |
|
Designing COM Components for .NET |
|
|
430 | (4) |
|
|
434 | (5) |
|
Using ADO from Visual Basic .NET |
|
|
439 | (1) |
|
|
440 | (1) |
|
Using ActiveX Controls from Windows Forms |
|
|
441 | (2) |
|
Invoking .NET Components from COM |
|
|
443 | (1) |
|
Creating a .NET Assembly for COM |
|
|
444 | (1) |
|
|
445 | (1) |
|
|
446 | (6) |
|
Using the Platform Invocation Services |
|
|
446 | (1) |
|
Calling a Simple API Function |
|
|
447 | (1) |
|
|
448 | (1) |
|
|
449 | (1) |
|
Using Automatic ANSI/Unicode Location |
|
|
449 | (1) |
|
Passing Structures as Parameters |
|
|
450 | (2) |
|
Using the Migration Wizard |
|
|
452 | (2) |
|
|
452 | (1) |
|
|
452 | (2) |
|
General Wizard Activities |
|
|
454 | (1) |
|
|
454 | (3) |
Index |
|
457 | |