Tải bản đầy đủ (.pdf) (1,999 trang)

Visual basic 2005 in a nutshell, 3rd edition (2006)

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (4.92 MB, 1,999 trang )

VisualBasic2005:InaNutshell,3rdEdition
ByPaulLomax,TimPatrick,RonPetrusha,
StevenRoman,Ph.D.
...............................................
Publisher:O'Reilly
PubDate:January2006
PrintISBN-10:0-596-10152-X
PrintISBN-13:978-0-59-610152-7
Pages:766

TableofContents|Index

WhenMicrosoftmadeVisualBasicintoanobject-orientedprogramminglanguage,millions
ofVBdevelopersresistedthechangetothe.NETplatform.Now,afterintegratingfeedback
fromtheircustomersandcreatingVisualBasic2005,Microsoftfinallyhastherightcarrot.
VisualBasic2005offersthepowerofthe.NETplatform,yetrestoresthespeedand
convenienceofVisualBasic.Accordingly,we'verevisedtheclassicinaNutshellguideto
theVisualBasiclanguagetocovertheVisualBasic2005versionandallofitsnew
features.
Unlikeotherbooksonthesubject,VisualBasic2005inaNutshell,3rdEditiondoesn't
assumeyou'reanovice.It'sadetailed,professionalreferencetotheVisualBasic
language-areferencethatyoucanusetojogyourmemoryaboutaparticularlanguage
elementorparameter.It'llalsocomeinhandywhenyouwanttomakesurethatthere
isn'tsome"gotcha"you'veoverlookedwithaparticularlanguagefeature.
Thebookisdividedintothreemajorparts:PartIintroducesthemainfeaturesand
conceptsbehindVisualBasicprogramming;PartIIthoroughlydetailsallthefunctions,
statements,directives,objects,andobjectmembersthatmakeuptheVisualBasic
language;andPartIIIcontainsaseriesofhelpfulappendices.Someofthenewfeatures
coveredincludeGenerics,aconvenientnewlibrarycalledMyNamespace,andthe
operatorsusedtomanipulatedatainVisualBasic.
NomatterhowmuchexperienceyouhaveprogrammingwithVisualBasic,youwantVisual


Basic2005inaNutshell,3rdEditioncloseby,bothasastandardreferenceguideandasa
toolfortroubleshootingandidentifyingprogrammingproblems.


VisualBasic2005:InaNutshell,3rdEdition
ByPaulLomax,TimPatrick,RonPetrusha,
StevenRoman,Ph.D.
...............................................
Publisher:O'Reilly
PubDate:January2006
PrintISBN-10:0-596-10152-X
PrintISBN-13:978-0-59-610152-7
Pages:766

TableofContents|Index













































Copyright

Preface
WhyAnotherVisualBasicBook?
WhoThisBookIsFor
HowThisBookIsStructured
AbouttheThirdEdition
UsingCodeExamples
ConventionsUsedinThisBook
Safari®Enabled
HowtoContactUs
Acknowledgments
PartI:TheBasics
Chapter1.Introduction
Section1.1.WhyVisualBasic.NET?
Section1.2.WhatIsVisualBasic.NET?
Section1.3.WhatCanYouDowithVisualBasic.NET?
Section1.4.VersionsofVisualBasicfor.NET
Chapter2.The.NETFramework:GeneralConcepts
Section2.1.CommonLanguageRuntime
Section2.2.ManagedCode
Section2.3.Namespaces
Section2.4.TypesandObjects


















































































Section2.5.Assemblies
Section2.6.TheFrameworkClassLibrary
Section2.7.ApplicationDeployment
Section2.8.The.NETFrameworkandVisualBasic
Chapter3.IntroductiontoObject-OrientedProgramming
Section3.1.PrinciplesofObject-OrientedProgramming
Section3.2.OOPDevelopmentinVisualBasic
Chapter4.VariablesandDataTypes
Section4.1.DataTypes
Section4.2.Variables
Section4.3.Constants
Section4.4.Enumerations
Section4.5.Arrays
Section4.6.Collections
Section4.7.ParametersandArguments
Chapter5.Operators
Section5.1.ArithmeticOperators
Section5.2.ConcatenationOperators
Section5.3.LogicalandBitwiseOperators
Section5.4.AssignmentOperators

Section5.5.ComparisonOperators
Section5.6.ObjectOperators
Section5.7.OperatorOverloading
Section5.8.OperatorPrecedence
Chapter6.ProgramStructure
Section6.1.VisualStudioApplicationTypes
Section6.2.ReferencingComponentsandClasses
Section6.3.ApplicationEntryPoints
Section6.4.CodeFileContents
Section6.5.TheStructureofaVisualBasicProgram
Chapter7.The.NETFrameworkClassLibrary
Section7.1.TheSystemNamespace
Section7.2.TheSystem.CollectionsNamespace
Section7.3.TheSystem.DataNamespace
Section7.4.TheSystem.IONamespace
Section7.5.TheSystem.Text.RegularExpressionsNamespace
Section7.6.TheSystem.Windows.FormsNamespace
Section7.7.OtherNamespaces
















































































Chapter8.DelegatesandEvents
Section8.1.Delegates
Section8.2.EventsandEventBinding
Chapter9.Attributes
Section9.1.SyntaxandUse
Section9.2.DefiningaCustomAttribute
Section9.3.UsingaCustomAttribute
Chapter10.Generics
Section10.1.WhatAreGenerics?
Section10.2.TypeParameters
Section10.3.MultipleTypeParameters
Section10.4.Constraints
Section10.5.MultipleConstraints
Section10.6.AccessingTypeParameterMembers
Section10.7.GenericMethods
Section10.8.NestedGenericTypes
Section10.9.OverloadedTypesandMembers
Chapter11.ErrorHandlinginVisualBasic
Section11.1.ErrorDetectionandErrorHandling
Section11.2.RuntimeErrorHandling
Section11.3.DealingwithLogicErrors
Section11.4.ErrorConstants
PartII:Reference
Chapter12.TheLanguageReference
#ConstDirective

#If...Then...#ElseDirective
#Region...#EndRegionDirective
AbsFunction
AcosFunction
AddHandlerStatement
AddressOfOperator
AppActivateProcedure
ApplicationClass
Application.CompanyNameProperty
Application.DoEventsMethod
Application.ExecutablePathProperty
Application.ProductNameProperty
Application.ProductVersionProperty




Application.RunMethod




ArrayClass
Array.BinarySearchMethod







































Array.CopyMethod
Array.IndexOfMethod
Array.LastIndexOfMethod
Array.ReverseMethod
Array.SortMethod
Asc,AscWFunctions
AssemblyVersionAttribute
AsinFunction
AtanFunction
Atan2Function
AttributeUsageAttribute
BeepProcedure
CallStatement
CallByNameFunction
CBoolFunction
CByteFunction
CCharFunction
CDateFunction
CDblFunction
CDecFunction
CeilingFunction
ChDirProcedure
ChDriveProcedure
ChooseFunction
Chr,ChrWFunctions
CIntFunction
Class...EndClassStatement
ClipboardClass
CLngFunction

CLSCompliantAttribute
CObjFunction
CollectionClass
Collection.AddMethod
Collection.CountProperty
Collection.ItemProperty









































Collection.RemoveMethod



ColorDialogClass




COMClassAttribute
CommandFunction





































ConstStatement
ContinueStatement
CosFunction
CoshFunction
CreateObjectFunction
CSByteFunction
CShortFunction
CSngFunction
CStrFunction
CTypeFunction
CUIntFunction
CULngFunction
CUShortFunction
CurDirFunction
CustomEventStatement
DateAddFunction
DateDiffFunction
DatePartFunction
DateSerialFunction
DateStringProperty
DateValueFunction
DayFunction
DDBFunction
DebugClass
Debug.AssertMethod
Debug.ListenersProperty
Debug.WriteMethod
Debug.WriteIfMethod

Debug.WriteLineMethod
Debug.WriteLineIfMethod
DeclareStatement
DefaultMemberAttribute
DelegateStatement







































DeleteSettingProcedure



DimStatement











DirFunction

DirectCastFunction
DirectoryClass
Directory.CreateDirectoryMethod



































































Directory.DeleteMethod
Directory.ExistsMethod
Directory.GetCreationTimeMethod
Directory.GetDirectoriesMethod
Directory.GetDirectoryRootMethod
Directory.GetFilesMethod
Directory.GetFileSystemEntriesMethod
Directory.GetLogicalDrivesMethod
Directory.GetParentMethod
Directory.MoveMethod
Do...LoopStatement
EField
EndStatement
EnumStatement
EnvironFunction
EOFFunction
EraseStatement
ErlProperty
ErrObject
Err.ClearMethod
Err.DescriptionProperty
Err.GetExceptionMethod

Err.HelpContextProperty
Err.HelpFileProperty
Err.LastDLLErrorProperty
Err.NumberProperty
Err.RaiseMethod
Err.SourceProperty
ErrorStatement
ErrorToStringFunction
EventStatement




ExceptionClass



ExitStatement






ExpFunction
FileClass
File.ExistsMethod






FileAttrFunction
FileCloseProcedure
FileCopyProcedure































FileDateTimeFunction
FileGet,FileGetObjectProcedures
FileLenFunction
FileOpenProcedure
FilePut,FilePutObjectProcedures
FileWidthProcedure
FilterFunction
FixFunction
FlagsAttribute
FloorFunction
FontDialogClass
For...NextStatement
ForEach...NextStatement
FormatFunction
FormatCurrency,FormatNumber,FormatPercentFunctions
FormatDateTimeFunction
FreeFileFunction
FriendKeyword
FunctionStatement
FVFunction
GetAllSettingsFunction
GetAttrFunction
GetCharFunction
GetObjectFunction
GetSettingFunction

GetTypeOperator
GlobalKeyword
GoToStatement


































GuidAttribute




HandlesKeyword
HashtableClass




Hashtable.AddMethod
Hashtable.ContainsKeyMethod
















Hashtable.ContainsValueMethod
Hashtable.CopyToMethod
Hashtable.ItemProperty
Hashtable.KeysProperty
Hashtable.RemoveMethod
Hashtable.ValuesProperty























































HexFunction
HourFunction
IEEERemainderFunction
If...Then...ElseStatement
IIfFunction
ImplementsKeyword
ImplementsStatement
ImportsStatement
InheritsStatement
InputProcedure
InputBoxFunction
InputStringFunction
InStrFunction
InStrRevFunction
IntFunction
Interface...EndInterfaceStatement
IPmtFunction
IRRFunction
IsOperator
IsArrayFunction
IsDateFunction
IsDBNullFunction
IsErrorFunction
IsNotOperator
IsNothingFunction





IsNumericFunction



IsReferenceFunction





JoinFunction
KillProcedure
LBoundFunction












LCaseFunction
LeftFunction
LenFunction

LikeOperator
LineInputFunction











LocFunction
LockProcedure
LOFFunction
LogFunction















































Log10Function
LSetFunction
LTrimFunction
MarshalAsAttribute
MaxFunction
MeKeyword
MidFunction
MidStatement
MinFunction
MinuteFunction
MIRRFunction
MkDirProcedure
ModOperator
Module...EndModuleStatement
MonthFunction
MonthNameFunction
MsgBoxFunction
MTAThreadAttribute
MyBaseKeyword
MyClassKeyword
NamespaceStatement




NewKeyword





NothingKeyword
NowProperty






NPerFunction
NPVFunction
ObsoleteAttribute
OctFunction





OfKeyword
OnErrorStatement
OpenFileDialogClass



















OperatorStatement
OptionCompareStatement
OptionExplicitStatement
OptionStrictStatement
OutAttribute
ParamArrayAttribute
PartialKeyword
PartitionFunction




















PIField
PmtFunction
PowFunction
PPmtFunction
Print,PrintLineProcedures
PrivateKeyword
PropertyStatement
ProtectedKeyword
PublicKeyword
PVFunction
QBColorFunction
QueueClass
Queue.ContainsMethod
Queue.CopyToMethod
Queue.DequeueMethod
Queue.EnqueueMethod
Queue.PeekMethod























Queue.ToArrayMethod



RaiseEventStatement





RandomizeProcedure
RateFunction
ReDimStatement













RemStatement
RemoveHandlerStatement
RenameProcedure
ReplaceFunction
ResetProcedure

















ResumeStatement
ReturnStatement
RGBFunction
RightFunction
RmDirProcedure
RndFunction
RoundFunction













RSetFunction
RTrimFunction
SaveFileDialogClass
SaveSettingProcedure
ScriptEngineProperty






























ScriptEngineBuildVersionProperty
ScriptEngineMajorVersionProperty
ScriptEngineMinorVersionProperty
SecondFunction

SeekFunction
SeekProcedure
SelectCaseStatement
Send,SendWaitMethods
SetAttrProcedure
ShadowsKeyword
SharedKeyword
ShellFunction
SignFunction




SinFunction



SinhFunction






SLNFunction
SpaceFunction
SPCFunction
SplitFunction















SqrtFunction
StackClass
Stack.ContainsMethod
Stack.CopyToMethod
Stack.PeekMethod
Stack.PopMethod






Stack.PushMethod
Stack.ToArrayMethod
STAThreadAttribute
StaticStatement























StopStatement
StrFunction
StrCompFunction
StrConvFunction
StrDupFunction
StrReverseFunction
Structure...EndStructureStatement
SubStatement
SwitchFunction
SYDFunction











SyncLockStatement
SystemTypeNameFunction
TABFunction
TanFunction
TanhFunction
ThreadStaticAttribute
ThrowStatement
TimeOfDayProperty














TimerProperty



TimeSerialFunction




TimeStringProperty
TimeValueFunction












TodayProperty
TrimFunction
Try...Catch...FinallyStatement
TryCastFunction
TypeNameFunction

















TypeOfOperator
UBoundFunction
UCaseFunction
UnlockProcedure
Using...EndUsingStatement
ValFunction
VarTypeFunction











VBFixedArrayAttribute
VBFixedStringAttribute
VbTypeNameFunction
WebMethodAttribute
WebServiceAttribute
WeekdayFunction
WeekdayNameFunction
While...EndWhileStatement
With...EndWithStatement





























WithEventsKeyword
Write,WriteLineProcedures
YearFunction
Chapter13.The'My'Reference
AllUsersApplicationDataProperty
AltKeyDownProperty
ApplicationObject
ApplicationContextProperty
AssemblyNameProperty




AudioObject



AvailablePhysicalMemoryProperty




AvailableVirtualMemoryProperty




ButtonsSwappedProperty
CapsLockProperty














ChangeCultureMethod
ChangeUICultureMethod
ClassesRootProperty
ClearMethod
ClipboardObject
ClockObject



















CloseMethod
CombinePathMethod
CommandLineArgsProperty
CommentTokensProperty
CompanyNameProperty
ComputerObject
ContainsAudioMethod
ContainsDataMethod













ContainsFileDropListMethod
ContainsImageMethod
ContainsTextMethod
CopyDirectoryMethod
CopyFileMethod












CopyrightProperty
CreateDirectoryMethod
CtrlKeyDownProperty
CultureProperty
CurrentConfigProperty
CurrentDirectoryProperty
CurrentPrincipalProperty
CurrentUserProperty

CurrentUserApplicationDataProperty
DefaultFileLogWriterProperty















DeleteDirectoryMethod



DeleteFileMethod




DelimitersProperty
DeploymentProperty






DescriptionProperty
DesktopProperty
DirectoryExistsMethod
















DirectoryPathProperty
DoEventsMethod
DownloadFileMethod
DrivesProperty
DynDataProperty
EndOfDataProperty
ErrorLineProperty





















ErrorLineNumberProperty
FieldWidthsProperty
FileExistsMethod
FileSystemObject
FindInFilesMethod
FormsObject
GetAudioStreamMethod
GetDataMethod
GetDataObjectMethod













GetDirectoriesMethod
GetDirectoryInfoMethod
GetDriveInfoMethod
GetEnvironmentVariableMethod
GetFileDropListMethod
GetFileInfoMethod
GetFilesMethod
GetImageMethod
GetNameMethod
GetParentPathMethod
GetTempFileNameMethod


















GetTextMethod
GetValueMethod





GmtTimeProperty
HasFieldsEnclosedInQuotesProperty
InfoObject(My.Application)




InfoObject(My.Computer)
InitializeWithWindowsUserMethod



InstalledUICultureProperty



















IsAuthenticatedProperty
IsAvailableProperty
IsInRoleMethod
IsNetworkDeployedProperty
KeyboardObject
LineNumberProperty
LoadedAssembliesProperty
LocalMachineProperty























LocalTimeProperty
LogObject(My)
LogObject(My.Application)
MinimumSplashScreenDisplayTimeProperty
MouseObject
MoveDirectoryMethod
MoveFileMethod
MyNamespace
MyDocumentsProperty
MyMusicProperty















MyPicturesProperty
NameProperty(My.Computer)
NameProperty(My.User)
NetworkObject
NetworkAvailabilityChangedEvent(My.Application)
NetworkAvailabilityChangedEvent(My.Computer.Network)



NumLockProperty




OpenFormsProperty




OpenSerialPortMethod

OpenTextFieldParserMethod




OpenTextFileReaderMethod
OpenTextFileWriterMethod




OSFullNameProperty
OSPlatformProperty






OSVersionProperty
PeekCharsMethod
PerformanceDataProperty
PingMethod




PlayMethod
PlaySystemSoundMethod

















PortsObject
ProductNameProperty
ProgramFilesProperty
ProgramsProperty
ReadAllBytesMethod
ReadAllTextMethod
ReadFieldsMethod

























ReadLineMethod
ReadToEndMethod
RegistryObject
RenameDirectoryMethod
RenameFileMethod
RequestObject
ResourcesObject
ResponseObject
RunMethod
SaveMySettingsOnExitProperty
ScreenProperty







ScrollLockProperty
SendKeysMethod
SerialPortNamesProperty
SetAudioMethod









SetDataMethod







SetDataObjectMethod
SetDelimitersMethod
SetFieldWidthsMethod
SetFileDropListMethod
SetImageMethod











SetTextMethod
SettingsObject



SetValueMethod




ShiftKeyDownProperty
ShutdownEvent








SpecialDirectoriesObject

SplashScreenProperty
StackTraceProperty
StartupEvent
StartupNextInstanceEvent
StopMethod













TempProperty
TextFieldParserObject
TextFieldTypeProperty
TickCountProperty














TitleProperty
TotalPhysicalMemoryProperty
TotalVirtualMemoryProperty
TraceSourceProperty
TrademarkProperty
TrimWhiteSpaceProperty
UICultureProperty
UnhandledExceptionEvent
UploadFileMethod
UserObject
UsersProperty
VersionProperty



















WebServicesObject





WheelExistsProperty
WheelScrollLinesProperty
WorkingSetProperty





WriteAllBytesMethod
WriteAllTextMethod



WriteEntryMethod



WriteExceptionMethod


































PartIII:Appendixes
AppendixA.LanguageElementsbyCategory
SectionA.1.ArrayHandling
SectionA.2.Clipboard
SectionA.3.CollectionObjects
SectionA.4.CommonDialogs
SectionA.5.ConditionalCompilation
SectionA.6.Conversion
SectionA.7.DateandTime
SectionA.8.Debugging
SectionA.9.Declaration
SectionA.10.ErrorHandling
SectionA.11.FileSystem
SectionA.12.Financial
SectionA.13.Information




SectionA.14.Input/Output
SectionA.15.IntegratedDevelopmentEnvironment







SectionA.16.Interaction

SectionA.17.Mathematics
SectionA.18.ProgramStructureandFlow
SectionA.19.Programming
SectionA.20.Registry










SectionA.21.StringManipulation





AppendixB.NamespaceHierarchy
SectionB.1.'My'NamespaceHierarchy
SectionB.2.SystemNamespaceHierarchy






AppendixC.ConstantsandEnumerations

SectionC.1.VisualBasicIntrinsicConstants
SectionC.2.ControlCharsClass
SectionC.3.VisualBasicEnumerations





AppendixD.What'sNewandDifferentinVisualBasic.NET2002
SectionD.1.LanguageChangesinVB.NET2002
SectionD.2.ChangestoProgrammingElements
























SectionD.3.ObsoleteProgrammingElements
SectionD.4.StructuredExceptionHandling
SectionD.5.ChangesinObjectOrientation
AppendixE.What'sNewandDifferentinVisualBasic.NET2003
SectionE.1.LanguageChangesinVB.NET2003
AppendixF.What'sNewandDifferentinVisualBasic2005
SectionF.1.EnhancementsofExistingFunctionality
SectionF.2.The'My'Namespace
SectionF.3.OtherNewFeatures
AppendixG.VB6LanguageElementsNoLongerSupported
AppendixH.TheVisualBasicCommand-LineCompiler
SectionH.1.CompilerBasics


SectionH.2.Command-LineSwitches

SectionH.3.UsingaResponseFile

SectionH.4.ConditionalCompilationConstants

AbouttheAuthors

Colophon

Index



VisualBasic2005inaNutshell
byTimPatrick,StevenRoman,RonPetrusha,andPaulLomax
Copyright©2006O'ReillyMedia,Inc.Allrightsreserved.
PrintedintheUnitedStatesofAmerica.
PublishedbyO'ReillyMedia,Inc.,1005GravensteinHighway
North,Sebastopol,CA95472.
O'Reillybooksmaybepurchasedforeducational,business,or
salespromotionaluse.Onlineeditionsarealsoavailablefor
mosttitles(safari.oreilly.com).Formoreinformation,contact
ourcorporate/institutionalsalesdepartment:(800)998-9938or

Editor:

JeffPepper

ProductionEditor:

DarrenKelly

Copyeditor:

ChrisDowney

Proofreader:

GenevieveRajewski

Indexer:


JohnnaVanHooseDinse

CoverDesigner:

PamSpremulli

InteriorDesigner:

DavidFutato

Illustrators:

RobertRomano,JessamynRead,andLesleyBorash

PrintingHistory:


August2001:

FirstEdition.

April2002:

SecondEdition.

January2006:

ThirdEdition.

NutshellHandbook,theNutshellHandbooklogo,andthe

O'ReillylogoareregisteredtrademarksofO'ReillyMedia,Inc.
TheInaNutshellseriesdesignations,VisualBasic2005ina
Nutshell,ThirdEdition,theimageofacatfish,andrelatedtrade
dressaretrademarksofO'ReillyMedia,Inc.
Manyofthedesignationsusedbymanufacturersandsellersto
distinguishtheirproductsareclaimedastrademarks.Where
thosedesignationsappearinthisbook,andO'ReillyMedia,Inc.
wasawareofatrademarkclaim,thedesignationshavebeen
printedincapsorinitialcaps.
Whileeveryprecautionhasbeentakeninthepreparationofthis
book,thepublisherandauthorsassumenoresponsibilityfor
errorsoromissions,orfordamagesresultingfromtheuseof
theinformationcontainedherein.
ISBN:0-596-10152-X
[M]




Preface
MicrosoftVisualBasicbeganitslifebackin1991asakindof
amalgamationofMicrosoft'sQBasicprogramminglanguageand
agraphicalinterfacedesignprogramdevelopedinpartbyAlan
Cooper.Sincethen,ithasbecomeoneofthemostpopular
programminglanguagesintheworld.
The10thanniversaryofVisualBasiccoincidedwiththe
announcementofMicrosoft'snew.NETplatform,andwithita
totallyrevisedandrevampedversionofVisualBasicnamed
"VisualBasic.NET."Withtheinitialreleasein2002,the
languagewasstreamlinedandmodernized,andmanyold

"compatibility"elementsweredroppedfromthelanguage.
Sincethatfirstrelease,VB.NEThasbeenenhancedand
improvedthroughtwomoregeneralreleases(in2003and
2005).
Pre-.NETversionsofVBincludeda"goodtry"implementationof
standardobject-orientedfeatures,buttheyoftencameup
short.Teamedwith.NET,VisualBasicisnowafullyobjectorientedprogramming(OOP)language,withtheinclusionofthe
longsought-afterclassinheritancefeature,aswellasother
OOPelements.The2005releaseaddsoperatoroverloadingto
thelanguage,somethingthatwasabsentintheinitial.NET
version.
Before.NET,Microsoft'sComponentObjectModel(COM)
technologyplayedasignificantroleinapplicationdevelopment,
especiallywhenitbecamepartofthefoundationofVisualBasic
4.0.Withtheadventof.NET,COMbeginstotakeitsexitfrom
theWindowsprogrammingstage,as.NETincludesanew
namespace-basedcomponentintegrationsystem.Thisis
somewhatunfortunate,sinceVisualBasicdevelopershavealot
oftimeandsourcecodeinvestedinCOMcomponents.Asgreat


asCOMwas,itwasalsocomplex,andtherewerenumerous
compatibilityissueswhensharingcomponentsbetweenVisual
Basic,VisualC++,andotherlanguagesthateitherproducedor
consumedthese"ActiveX"libraries.Allcorecompatibilityissues
arebanishedwith.NET,andalthoughyoucanstilltake
advantageofyoursubstantialinvestmentinCOMcomponents
through.NET's"interop"features,theenhancementsavailable
through.NETwillcertainlydrawalldeveloperseventuallyto
abandontheCOMsystem.

Fordeveloperswhohavemadetheswitchfrom.NET,thebest
newsofallisthatVisualBasicisnowan"equalplayer"with
otherlanguages,intermsofprogrammingpowerand
accessibilityofWindowsfeaturesandservices.Inthepast,
VisualBasicservedasa"wrapper"thatsimplifiedandhidmuch
ofthecomplexityofWindowsanditsApplicationProgramming
Interface(API).Now,VisualBasicprogrammershavefulland
easyaccesstoallfeaturesofthe.NETandWindowsplatforms,
justasVisualC++andC#programmersdo.
Theextensivechangestothelanguageandtheintroductionof
the.NETplatformmakeareferenceguidetotheVisualBasic
languagemoreessentialthanever.Atthesametime,they
makeiteasytodelineatethisbook'ssubjectmatter.Thisisa
bookthatfocusesonthelanguageelementsof.NET-powered
VisualBasiconitsstatements,functions,procedures,directives,
andobjects.
ThisbookprovidesessentialinformationontheVisualBasic
languageforthe.NETplatform,buttherearesomethingsthis
bookisnot:
ItisnotareferenceguidetoVisualBasicforApplications
(VBA),theprogramminglanguageusedinallofthemajor
applicationsintheMicrosoftOfficesuite,aswellasin
dozensofotherthird-partyapplications.VBAservedasthe
coreprogramminglanguageinearlierversionsofVisual


×