Introduction to Visual Basic NET.pdf
(
4243 KB
)
Pobierz
714660298 UNPDF
Dear Reader,
I wanted to take this opportunity to explain the rationale behind this book
showing up on your shelf for free.
Quite some time ago, Sams Publishing determined that the next big thing
to hit the programmer/developer community would be Microsoft’s Visual
Studio.NET and the .NET Framework. After discussions with many of you,
our authors and key Microsoft team members, Sams dedicated itself to a
strategy that would support your efforts to learn the .NET Framework as
efficiently and as quickly as possible.
A Programmer’s Introduction to Visual Basic.NET
is the perfect example
of how our strong relationship with Microsoft and our dedication to bring-
ing you authors who are already respected sources in the community suc-
cessfully blend and show that Sams Publishing is the source for .NET
learning.
Bringing you a Beta2 compliant book by May 2001 was not an easy task.
Sams called upon a respected author, Craig Utley, to take on this project.
Craig holds a unique place in the VB community where he has been devel-
oping in VB since version 1.0. He brings years of experience as a trainer,
writer, and speaker to this project and gives you the solid reference you
need to make the transition from VB to VB.NET.
I hope this book gives you the tools you need to begin to learn VB.NET. I
invite your comments and ideas as I work to make Sams the publisher you
look to as your .NET learning resource.
On behalf of all of the Sams Publishing team,
Paul Boger
Publisher
Sams Publishing
E-mail
Paul.Boger@samspublishing.com
Mail
Paul Boger
Publisher
Sams Publishing
201 West 103rd Street
Craig Utley
Visual Basic.NET
201 West 103rd Street
Indianapolis, IN 46290 USA
A Programmer’s Introduction to
A Programmer’s Guide to Visual Basic.NET
E
XECUTIVE
E
DITOR
Shelley Kronzek
Copyright © 2001 by Sams Publishing
D
EVELOPMENT
E
DITOR
Kevin Howard
All rights reserved. No part of this book shall be reproduced, stored in a
retrieval system, or transmitted by any means, electronic, mechanical,
photocopying, recording, or otherwise, without written permission from
the publisher. No patent liability is assumed with respect to the use of the
information contained herein. Although every precaution has been taken in
the preparation of this book, the publisher and author assume no responsi-
bility for errors or omissions. Nor is any liability assumed for damages
resulting from the use of the information contained herein.
International Standard Book Number: 0-672-32203-X
Library of Congress Catalog Card Number: 2001087650
Printed in the United States of America
First Printing: May 2001
04 03 02 01
M
ANAGING
E
DITOR
Charlotte Clapp
P
ROJECT
E
DITOR
Carol Bowers
C
OPY
E
DITOR
Michael Henry
I
NDEXER
Eric Schroeder
T
ECHNICAL
E
DITOR
Boyd Nolan
4 3 2 1
T
EAM
C
OORDINATOR
Pamalee Nelson
Trademarks
I
NTERIOR
D
ESIGNER
Gary Adair
All terms mentioned in this book that are known to be trademarks or ser-
vice marks have been appropriately capitalized. Sams Publishing cannot
attest to the accuracy of this information. Use of a term in this book
should not be regarded as affecting the validity of any trademark or ser-
vice mark.
C
OVER
D
ESIGNER
Gary Adair
P
AGE
L
AYOUT
Gloria Schurick
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate
as possible, but no warranty or fitness is implied. The information pro-
vided is on an “as is” basis. The author and the publisher shall have nei-
ther liability nor responsibility to any person or entity with respect to any
loss or damages arising from the information contained in this book.
Overview
Foreword
viii
Introduction
1
1 Why Should You Move to Visual Basic.NET?
3
2 Your First VB.NET Application
21
3 Major VB.NET Changes
49
4 Building Classes and Assemblies with VB.NET
73
5 Inheritance with VB.NET
91
6 Database Access with VB.NET and ADO.NET
105
7 Building Web Applications with VB.NET and ASP.NET
133
8 Building Web Services with VB.NET
153
9 Building Windows Services with VB.NET
165
10 Upgrading VB6 Projects to VB.NET
175
A The Common Language Specification
187
Index
191
Contents
I
NTRODUCTION
1
1W
HY
S
HOULD
Y
OU
M
OVE TO
V
ISUAL
B
ASIC
.NET? 3
Visual Basic.NET: A New Framework ....................................................3
The Common Language Runtime............................................................6
Managed Execution ................................................................................8
Microsoft Intermediate Language (MSIL) ........................................8
The Just-In-Time Compiler ................................................................9
Executing Code ..................................................................................9
Assemblies........................................................................................10
The Common Type System ..................................................................12
Classes ..............................................................................................13
Interfaces ..........................................................................................13
Value Types ......................................................................................14
Delegates ..........................................................................................14
The .NET Framework Class Library ....................................................14
Self-Describing Components ................................................................15
Cross-Language Interoperability ..........................................................16
The Catch..........................................................................................17
Security ..................................................................................................17
Code Access Security (CAS)............................................................18
Role-Based Security ........................................................................18
Summary ................................................................................................18
2Y
OUR
F
IRST
VB.NET A
PPLICATION
21
The Start Page........................................................................................21
Creating a New Project ..........................................................................23
Examining the IDE ..........................................................................25
Creating Your First VB.NET Application..............................................31
Windows Application Enhancements ....................................................36
Resizing Controls Automatically......................................................36
Anchoring Controls to the Form Edges ..........................................38
Easier Menus ....................................................................................41
Setting Tab Order ............................................................................42
Line and Shape Controls: You’re Outta Here ..................................44
Form Opacity....................................................................................45
Summary ................................................................................................48
3M
AJOR
VB.NET C
HANGES
49
General Changes ....................................................................................49
Default Properties ............................................................................49
Subs and Functions Require Parentheses ........................................50
Changes to Boolean Operators ........................................................51
Plik z chomika:
secretsanta_2013
Inne pliki z tego folderu:
1000 Things You Should Know About Ancient History.pdf
(70903 KB)
A First Course in Topology.pdf
(20901 KB)
A Gentle Introduction to GIS.pdf
(9002 KB)
A Geography of Russia and Its Neighbours.pdf
(18610 KB)
A Phenomenology of Landscape.pdf
(16388 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
@English
Dokumenty
Enid Blyton
Galeria
Zgłoś jeśli
naruszono regulamin