Tải bản đầy đủ (.pdf) (829 trang)

Microsoft visual basic 2005 step by step (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 (17.17 MB, 829 trang )


PUBLISHEDBY
MicrosoftPress
ADivisionofMicrosoftCorporation
OneMicrosoftWay
Redmond,Washington98052-6399
Copyright©2006byMichaelHalvorson
Allrightsreserved.Nopartofthecontentsofthisbookmaybereproduced
ortransmittedinanyformorbyanymeanswithoutthewrittenpermission
ofthepublisher.
LibraryofCongressControlNumber2005933122
PrintedandboundintheUnitedStatesofAmerica.
123456789QWT876543
DistributedinCanadabyH.B.FennandCompanyLtd.ACIPcatalogue
recordforthisbookisavailablefromtheBritishLibrary.
MicrosoftPressbooksareavailablethroughbooksellersanddistributors
worldwide.Forfurtherinformationaboutinternationaleditions,contactyour
localMicrosoftCorporationofficeorcontactMicrosoftPressInternational
directlyatfax(425)936-7329.VisitourWebsiteat
www.microsoft.com/learning/books/.Sendcommentsto

Microsoft,Microsoft,ActiveX,DataTips,Excel,FrontPage,IntelliSense,
MicrosoftPress,MSDN,MS-DOS,Outlook,PowerPoint,VisualBasic,
VisualC#,VisualC++,VisualInterDev,VisualJ#,VisualJ++,Visual
Studio,VisualWebDeveloper,Windows,WindowsNT,andWindows
ServerareeitherregisteredtrademarksortrademarksofMicrosoft
CorporationintheUnitedStatesand/orothercountries.Otherproductand
companynamesmentionedhereinmaybethetrademarksoftheirrespective
owners.
Theexamplecompanies,organizations,products,domainnames,e-mail
addresses,logos,people,places,andeventsdepictedhereinarefictitious.No




associationwithanyrealcompany,organization,product,domainname,emailaddress,logo,person,place,oreventisintendedorshouldbeinferred.
Thisbookexpressestheauthor'sviewsandopinions.Theinformation
containedinthisbookisprovidedwithoutanyexpress,statutory,orimplied
warranties.Neithertheauthors,MicrosoftCorporation,noritsresellers,or
distributorswillbeheldliableforanydamagescausedorallegedtobe
causedeitherdirectlyorindirectlybythisbook.
AcquisitionsEditor:BenRyan
ProjectEditor:MelissavonTschudi-Sutton
Production:OnlineTrainingSolutions,Inc.
BodyPartNo.X11-44966


CompanionContent
Thistitleincludesreferencestoelectroniccontent,suchassamplefiles,
samplecode,betasoftware,tools,andothercontent.Thiscontentis
providedasanadditionallearningtooltoaccompanythetext.Althoughthe
referencestothiscontentmightmentionaCDorCD-ROMwherethesefiles
areavailable,youcanaccessselectedportionsofthiscontentonlineby
goingto />ToviewthecompanioncontentforatitleatthisWebsite,typeinthe
productISBN(InternationalStandardBookNumber)ofthetitleinthetext
boxandclickGo.
TheISBNforthistitleislistedbelowandcanalsobefoundontheLOC
(LibraryofCongress)pagelistedintheTableofContents.
ISBN:0-7356-2131-4


Introduction
WelcometoMicrosoftVisualBasic2005StepbyStep,acomprehensive

introductiontoVisualBasicprogrammingusingtheMicrosoftVisualBasic
2005software.I'vedesignedthispractical,hands-ontutorialwithavarietyof
skilllevelsinmind.Theresultisthatnewprogrammerscanlearnsoftware
developmentfundamentalsinthecontextofuseful,real-worldapplications,
andexperiencedVisualBasicprogrammerscanquicklymastertheessential
toolsandprogrammingtechniquesofferedintheVisualBasic2005upgrade.
Complementingthiscomprehensiveapproachisthebook'sstructure—4
topicallyorganizedparts,20chapters,and54step-by-stepexercisesand
sampleprograms.Byusingthisbook,you'llquicklylearnhowtocreate
professional-qualityVisualBasic2005applicationsfortheMicrosoft
WindowsoperatingsystemandavarietyofWebbrowsers.You'llalsohave
fun!


WhatisVisualBasic2005?
VisualBasic2005isadevelopmenttoolthatyoucanusetobuild
applicationsthatperformusefulworkandlookgreatwithinavarietyof
settings.UsingVisualBasic2005,youcancreateapplicationsforthe
Windowsoperatingsystem,theWeb,hand-helddevices,andahostofother
environmentsandsettings.ThemostimportantadvantageofVisualBasicis
thatithasbeendesignedtoincreaseproductivityinyourdailydevelopment
work—especiallyifyouneedtouseinformationindatabasesorcreate
solutionsfortheInternet—butanimportantadditionalbenefitisthatonce
youbecomecomfortablewiththedevelopmentenvironmentinMicrosoft
VisualStudio2005,youcanusethesametoolstowriteprogramsfor
MicrosoftVisualC++2005,MicrosoftVisualC#2005,MicrosoftVisualJ#
2005,andotherthird-partytoolsandcompilers.

VisualBasic.NETVersions
ThefirstversionofVisualBasic.NET(MicrosoftVisualBasic.NET2002)

wasreleasedinFebruary2002.Thesecondrelease(MicrosoftVisualBasic
.NET2003)waswidelyavailableinMarch2003.Afteralongperiodof
developmentandintegrationwork,MicrosoftreleasedVisualBasic2005in
late2005.VisualBasic2005isnowsotightlyintegratedwithVisualStudio
thatitisonlyavailableasacomponentintheVisualStudio2005
programmingsuite,whichincludestheVisualC#,VisualC++,andVisualJ#
compilersandotherMicrosoft.NETdevelopmenttools.However,Visual
Studio2005issoldinseveraldifferentproductconfigurations,including
StandardEdition,ProfessionalEdition,TeamSuite,andExpressEdition.
I'vewrittenthisbooktobecompatiblewithalleditionsofVisualBasic2005
andVisualStudio2005,butespeciallywiththetoolsandtechniques
availableinVisualStudioStandardEditionandVisualStudioProfessional
Edition.AlthoughVisualBasic2005issimilarinmanywaystoVisualBasic
.NET2003,therearemanyimportantdifferencesandimprovements,soI
recommendthatyoucompletetheexercisesinthisbookusingtheVisual
Basic2005software.
NOTE
TheVisualBasic2005softwareisnotincludedwiththisbook!TheCD-


ROMdistributedwithmostversionsofthisbookcontainspracticefiles,
sampledatabases,andotherusefulinformationthatrequirestheVisualBasic
2005software(soldseparately)foruse.


FindingYourBestStartingPointinThisBook
Thisbookisdesignedtohelpyoubuildskillsinanumberofessentialareas.
Youcanusethisbookifyou'renewtoprogramming,switchingfromanother
programminglanguage,orupgradingfromVisualBasic6orVisualBasic
.NET2003.Usethefollowingtabletofindyourbeststartingpointinthis

book.
Ifyouare

Followthesesteps

New
To
programming

1. Installthepracticefilesasdescribedinthesection
“InstallingthePracticeFilesonYourComputer”later
inthisintroduction.
2. LearnbasicskillsforusingVisualBasic2005by
workingsequentiallyfromChapter1throughChapter
17.
3. CompletePartIV,“DatabaseandWebProgramming,”
asyourlevelofinterestorexperiencedictates.

Upgrading
FromVisual
Basic.NET
2002or2003

1. Installthepracticefilesasdescribedinthesection
“InstallingthePracticeFilesonYourComputer.”
2. CompleteChapters1through4,skimChapters5
through17,andcompleteChapters18through20.
3. Foradiscussionofspecificfeaturesthathavechanged
inthisupgrade,readChapters1,4,5,7,8,and13.


FromVisual
Basic6

1. Installthepracticefilesasdescribedinthesection
“InstallingthePracticeFilesonYourComputer.”
2. ReadChapters1through4carefullytolearnthenew


featuresoftheVisualStudio2005development
environment.
3. Payspecialattentiontothe“UpgradeNotes:Migrating
VisualBasic6CodetoVisualBasic2005”sidebars
nearthebeginningofeachchapter,whichhighlightthe
significantdifferencesbetweenVisualBasic6and
VisualBasic2005.
4. SkimChapters5through13toreviewthe
fundamentalsofevent-drivenprogramming,using
variables,andwritingdecisionstructures.Givespecial
attentiontoChapters5,6,9,and12.
5. WorksequentiallyfromChapters14through20to
learnthenewVisualBasic2005featuresrelatedto
userinterfacedesign,databaseprogramming,andWeb
programming.
Referencing
Thisbook
afterworking
throughthe
chapters

1. Usetheindextolocateinformationaboutspecific

topics,andusethetableofcontentstolocate
informationaboutgeneraltopics.
2. UsetheUpgradingIndextoseealistofthenew
featuresinVisualBasic2005andhowVisualBasic6
programcodeshouldbeupgraded.
3. ReadtheQuickReferenceattheendofeachchapter
forabriefreviewofthemajortasksinthechapter.The
QuickReferencetopicsarelistedinthesameorderas
they'representedinthechapter.


SystemRequirements
You'llneedthefollowinghardwareandsoftwaretocompletetheexercisesin
thisbook:
MicrosoftWindowsXPProfessionalEditionwithServicePack2or
MicrosoftWindowsXPHomeEditionwithServicePack2,Microsoft
WindowsServer2003withServicePack1,orMicrosoftWindows
2000withServicePack4(MicrosoftWindows2000DatacenterServer
isnotsupported)
MicrosoftVisualStudio2005StandardEditionorMicrosoftVisual
Studio2005ProfessionalEdition
600MHzPentiumorcompatibleprocessor(1GHzPentium
recommended)
192MBRAM(256MBormorerecommended)
Video(800x600orhigherresolution)monitorwithatleast256colors
(1024x768HighColor16-bitrecommended)
CD-ROMorDVD-ROMdrive
MicrosoftMouseorcompatiblepointingdevice
NOTE
ThisbookandthepracticefilesweretestedusingVisualStudio2005

StandardandVisualStudio2005Professional.Youmightnoticeafew
differencesifyou'reusingothereditionsofVisualStudio2005.Inparticular,
ifyou'reusingVisualStudio2005ExpressEdition,afewfeatureswillbe
unavailabletoyou.


PrereleaseSoftware
ThisbookwasreviewedandtestedagainsttheAugust2005Community
TechnicalPreview(CTP)ofVisualStudio2005.TheAugustCTPwasthe
lastpreviewbeforethefinalreleaseofVisualStudio2005.Thisbookis
expectedtobefullycompatiblewiththefinalreleaseofVisualStudio2005
andVisualBasic2005.Ifthereareanychangesorcorrectionsforthisbook,
theywillbecollectedandaddedtoaneasy-to-accessMicrosoftKnowledge
BasearticleontheWeb.Seethe“SupportforThisBook”sectionformore
information.


InstallingandUsingthePracticeFiles
TheCD-ROMinsidethisbookcontainsthepracticefilesthatyou'lluseas
youperformtheexercisesinthebook.Forexample,whenyou'relearning
howtodisplaydatabasetablesonaformbyusingtheGridDataViewcontrol,
you'llopenoneofthepracticefiles—anacademicdatabasenamed
Students.mdb—andthenuseVisualStudiodatabaseprogrammingtoolsto
accessthedatabase.Byusingthepracticefiles,youwon'twastetime
creatingfilesthataren'trelevanttotheexercise.Instead,youcanconcentrate
onlearninghowtomasterVisualBasic2005programmingtechniques.With
thefilesandthestep-by-stepinstructionsinthechapters,you'llalsolearnby
doing,whichisaneasyandeffectivewaytoacquireandremembernew
skills.
IMPORTANT

BeforeyoubreakthesealontheCD-ROM,besurethatthisbookmatches
yourversionofthesoftware.ThisbookisdesignedforusewithVisual
Studio2005andtheVisualBasic2005programminglanguage.Tofindout
whatsoftwareyou'rerunning,youcanchecktheproductpackage,oryou
canstartthesoftware,openaproject,andthenclickAboutMicrosoftVisual
StudioontheHelpmenuatthetopofthescreen.

InstallingthePracticeFiles
Installingthepracticefilesonyourharddiskrequiresapproximately7.2MB
ofdiskspace.Followthesestepstoinstallthepracticefilesonyour
computer'sharddisksothatyoucanusethemwiththeexercisesinthis
book.
1. RemovetheCDfromthepackageinsidethisbook,andinsertitinto
yourCD-ROMdrive.
NOTE
Anenduserlicenseagreementshouldopenautomatically.Ifthis
agreementdoesnotappear,openMyComputeronthedesktoporStart
menu,double-clicktheiconforyourCD-ROMdrive,andthendoubleclickStartCD.exe.


2. Reviewtheenduserlicenseagreement.Ifyouaccepttheterms,select
theacceptoption,andthenclickNext.
Amenuappearswithoptionsrelatedtothebook.
3. ClickInstallPracticeFiles.
4. Followtheonscreeninstructions.
NOTE
Forbestresultswhenusingthepracticefileswiththisbook,acceptthe
preselectedinstallationlocation,whichbydefaultisc:\vb05sbs.Ifyou
changetheinstallationlocation,you'llneedtomanuallyadjustthepaths
inseveralpracticefilestolocateessentialcomponents,suchasartwork

anddatabasefiles,whenyouusethem.
5. Whenthefileshavebeeninstalled,removetheCD-ROMfromyour
driveandreplaceitinthepackageinsidethebackcoverofyourbook.
Ifyouacceptedthedefaultsettings,afoldernamedc:\vb05sbshasbeen
createdonyourharddisk,andthepracticefileshavebeenplacedinthat
folder.You'llfindonefolderinc:\vb05sbsforeachchapterinthebook.
(Someofthefilesrepresentcompletedprojects,andotherswillrequire
thatyouentersomeprogramcode.)Ifyouhavetroublerunninganyof
thepracticefiles,refertothetextinthebookthatdescribesthosefiles.

UsingthePracticeFiles
Eachchapterinthisbookexplainswhenandhowtousethepracticefilesfor
thatchapter.Whenit'stimetouseapracticefile,thebooklistsinstructions
forhowtoopenthefile.Thechaptersarebuiltaroundscenariosthat
simulaterealprogrammingprojectssothatyoucaneasilyapplytheskills
youlearntoyourownwork.
NOTE
VisualBasic2005featuresanewfileformatforitsprojectsandsolutions.
Accordingly,youwon'tbeabletoopenthepracticefilesforthisbookif
you'reusinganolderversionoftheVisualBasicorVisualStudiosoftware.
ToseewhatversionofVisualBasicorVisualStudioyou'reusing,clickthe


AboutcommandontheHelpmenu.
VisualStudioisextremelycustomizableandcanbeconfiguredtoopenand
saveprojectsandsolutionsindifferentways.Theinstructionsinthisbook
generallyrelyonthedefaultsettingforVisualStudio.Formoreinformation
abouthowsettingswithinthedevelopmentenvironmentaffecthowyou
writeprogramsandusethepracticefiles,seethesection“CustomizingIDE
SettingstoMatchStepbyStepExercises”inChapter1,“Exploringthe

VisualStudioIntegratedDevelopmentEnvironment.”
Forthoseofyouwholiketoknowallthedetails,here'salistoftheVisual
BasicprojectsincludedontheCD-ROM.Eachprojectislocatedinitsown
folderandhasseveralsupportfiles.Lookatallthethingsyouwillbedoing!
Project

Description

Chapter1
MusicTrivia

Asimpletriviaprogramthatwelcomesyoutothe
programmingcourseanddisplaysadigitalphoto.

Chapter2
Lucky7

Yourfirstprogram—agamethatsimulatesaLasVegas
LuckySevenslotmachine.

Chapter3
Birthday

AprogramthatusestheDateTimePickercontroltopicka
date.

CheckBox

AprogramthatdemonstratestheCheckBoxcontrolandits
properties.


Hello

A“Hello,world!”programthatdemonstratestheLabel
andTextBoxcontrols.

InputControls Theuserinterfaceforagraphicalorderingenvironment,
assembledusingseveralpowerfulinputcontrols.
WebLink
Chapter4

AdemonstrationoftheLinkLabelcontrolthatopensaWeb
browserinyourVisualBasicapplication.


Menu

DemonstrateshowtouseVisualStudiodialogbox
controls,toolbars,andmenus.

Chapter5
Advanced
Math

Advanceduseofoperatorsforintegerdivision,remainder
division,exponentiation,andstringconcatenation.

BasicMath

Basicuseofoperatorsforaddition,subtraction,

multiplication,anddivision.

Constant
Tester

Usesaconstanttoholdafixedmathematicalentity.

DataTypes

AdemonstrationofVisualBasicfundamentaldatatypes
andtheirusewithvariables.

Framework
Math

Demonstratesthe.NETFrameworkclasseswith
mathematicalmethods.

InputBox

ReceivesinputwiththeInputBoxfunction.

VariableTest

Declaresandusesvariablestostoreinformation.

Chapter6
SelectCase

UsesaSelectCasedecisionstructureandaListBoxcontrol

todisplayawelcomemessageinseverallanguages.

User
Validation

UsestheIf…Then…Elsedecisionstructureanda
MaskedTextBoxcontroltomanagealogonprocess.

Chapter7
Celsius
Conversion

ConvertstemperaturesfromFahrenheittoCelsiusbyusing
aDoloop.

DigitalClock

Asimpledigitalclockprogramthatdemonstratesthe
Timercontrol.

ForLoop

DemonstratesusingaFor...Nextlooptodisplaytextina
TextBoxcontrol,andusingtheChrfunctiontocreatea
Wrapcharacter.

ForLoop
Icons

Usesaglobalcountervariableinaneventprocedureasan

alternativetoloops.Thisprogramalsodisplaysimagesby


usingaPictureBoxcontrol.
Timed
Password

DemonstrateshowtouseaTimercontroltocreatealogon
programwithapasswordtime-outfeature.

Windows
Version
Snippet

ShowshowtousethenewInsertSnippetcommandto
displaythecurrentversionofWindowsrunningonauser's
computer.

Chapter8
DebugTest

Asimulateddebuggingproblem,designedtobesolved
usingtheVisualStudiodebuggingtools.

Chapter9
DiscDrive
Error

AprogramthatcrasheswhenaCDdriveisused
incorrectly.ThisprojectisusedasthebasisofaVisual

Basicerrorhandler.

DiscDrive
Handler

Aprojectwithacompletederrorhandlerforloadingfiles
thatdemonstratestheTry…Catchsyntax.

Chapter10
TextBoxSub Ageneral-purposeSubprocedurethataddsitemstoalist
box.
TrackWins

AcleanversionoftheLucky7slotmachineprojectfrom
Chapter2,whichyouenhancebyusingpublicvariables
andafunctionthatcomputesthegame'swinrate.

Chapter11
ArrayClass
Sorts

Aprogramthatshowsyouhowtocreateandmanipulate
largeintegerarrays.DemonstratestheArray.Sortand
Array.ReversemethodsandhowtouseaProgressBar
controltogivetheuservisualfeedbackduringlongsorts.

Dynamic
Array

Computestheaveragetemperatureforanynumberofdays

byusingadynamicarray.

FixedArray

Computestheaverageweeklytemperaturebyusinga
fixed-lengtharray.

Chapter12


Controls
Collection

UsesaForEachloopandtheVisualStudioControls
collectiontomoveobjectsonaform.

URL
Collection

Demonstratesauser-definedcollectioncontainingalistof
Webaddresses(URLs)recentlyvisitedbytheuser.

Chapter13
QuickNote

Asimplenote-takingutilitythatdemonstratesthe
FileOpenfunctionandtheTextBox,MenuStrip,and
SaveFileDialogcontrols.

SortText


Atextfileeditorwithamenubarthatdemonstrateshowto
manageOpen,Close,SaveAs,InsertDate,SortText,and
Exitcommandsinaprogram.ContainsaShellSortmodule
forsortingarraysthatcanbeaddedtootherprogramming
projects.

TextBrowser

DisplaysthecontentsofatextfileinaVisualBasic
program.Demonstratesmenucommands,aTry…Catch
errorhandler,andtheFileOpenandLineInputfunctions,
andservesasafoundationfortheotherprogramsinthis
chapter.

Chapter14
AddControls

DemonstrateshowcontrolsareaddedtoaWindowsForm
atruntimebyusingprogramcode(nottheDesigner).

Anchorand
Dock

UsestheAnchorandDockpropertiesofaformtoalign
objectsatruntime.

Desktop
Bounds


UsestheStartPositionandDesktopBoundspropertiesto
positionaWindowsformatruntime.Alsodemonstrates
theFormBorderStyleproperty,Rectanglestructure,and
ShowDialogmethod.

LuckySeven
Help

TheenhancedLucky7program(TrackWins)fromChapter
10,whichisenhancedagainthroughtheadditionofa
secondformtodisplayHelpinformation.

Chapter15


DrawShapes

Demonstratesafewoftheusefulgraphicsmethodsinthe
System.Drawingnamespace,includingDrawEllipse,
FillRectangle,andDrawCurve.

MovingIcon

Animatesaniconontheform,movingitfromthetopof
theformtothebottomeachtimethatyouclicktheMove
Downbutton.

Transparent
Form


Demonstrateshowtochangethetransparencyofaformby
usingtheMeobjectandtheOpacityproperty.

ZoomIn

Simulateszoomingin,ormagnifying,anobjectonaform
(inthiscase,theplanetEarth).

Chapter16
Form
Inheritance

UsestheVisualStudioInheritancePickertocreateaform
thatinheritsitscharacteristicsandfunctionalityfrom
anotherform.

PersonClass

Demonstrateshowtocreatenewclasses,properties,and
methodsinaVisualBasicproject.ThenewPersonclassis
anemployeerecordwithfirstname,lastname,anddateof
birthfields,anditcontainsamethodthatcomputesthe
currentageofanemployee.

Chapter17
PrintDialogs

DemonstrateshowtocreatePrintPreviewandPageSetup
dialogboxes.


PrintFile

Aprojectthathandlesmoresophisticatedprintingtasks,
includingprintingamultipagetextfilewithwrapping
lines.Includeslotsofcodetouseinyourownprojects.

PrintGraphics PrintsgraphicsfromwithinaVisualBasicprogramby
usinganerrorhandler,thePrintmethod,andthe
DrawImagemethod.
PrintText

DemonstrateshowsimpletextisprintedinaVisualBasic
program.

Chapter18
ADOForm

DemonstrateshowADO.NETisusedtoestablisha


connectiontoaMicrosoftAccessdatabaseanddisplay
informationfromit.
Chapter19
DataGridView ShowshowtheDataGridViewcontrolisusedtodisplay
Sample
multipletablesofdataonaform.Alsodemonstrateshow
navigationbars,datasets,andtableadaptersare
interconnectedandboundtoobjectsonaform.
Chapter20
Chap20


DemonstratesusingVisualWebDeveloperandASP.NET
tocreateacarloancalculatorthatrunsinaWebbrowser,
offersHelpinformation,anddisplaysdatabaserecords.


UninstallingthePracticeFiles
Usethefollowingstepstoremovethepracticefilesaddedtoyourharddrive
bytheVisualBasic2005StepbyStepinstallationprogram.
1. InControlPanel,openAddOrRemovePrograms.
2. FromthelistofCurrentlyInstalledPrograms,selectMicrosoftVisual
Basic2005StepbyStep.
3. ClickRemove.
4. Followtheonscreeninstructionstoremovethepracticefiles


ConventionsandFeaturesinThisBook
Beforeyoustarttheexercisesinthisbook,youcansavetimeby
understandinghowIprovideinstructionsandtheelementsIuseto
communicateinformationaboutVisualBasicprogramming.Thefollowing
listsidentifystylisticconventions,discusshelpfulfeaturesofthebook,and
pointoutafewelementsthatareespeciallyusefulforreaderswhoplanto
upgradeVisualBasic6applicationstoVisualBasic2005.

Conventions
Thenamesofallprogramelements—controls,objects,methods,
functions,properties,andsoon—appearinitalic.
Hands-onexercisesforyoutofollowaregiveninnumberedlistsof
steps(1,2,andsoon).Aroundbullet(●)indicatesanexercisethathas
onlyonestep.

Textthatyouneedtotypeappearsinbold.
Asyouworkthroughsteps,you'lloccasionallyseetableswithlistsof
propertiesthatyou'llsetinVisualStudio.Textpropertiesappearwithin
quotes,butyoudon'tneedtotypethequotes.
Aplussign(+)betweentwokeynamesmeansthatyoumustpress
thosekeysatthesametime.Forexample,“PressAlt+Tab”meansthat
youholddowntheAltkeywhileyoupressTab.
ElementslabeledNote,Tip,MoreInfo,orImportantprovideadditional
informationoralternativemethodsforastep.Youshouldreadthese
beforecontinuingwiththeexercise.

OtherFeatures
Youcanlearnspecialprogrammingtechniques,background
information,orfeaturesrelatedtotheinformationbeingdiscussedby
readingthesidebarsthatappearthroughoutthechapters.Thesesidebars
oftenhighlightdifficultterminologyorsuggestfutureareasfor


exploration.
Youcanlearnaboutoptionsortechniquesthatbuildonwhatyou
learnedinachapterbytryingtheOneStepFurtherexerciseattheend
ofthatchapter.
Youcangetaquickreminderofhowtoperformthetasksyoulearned
byreadingtheQuickReferenceattheendofachapter.

UpgradingVisualBasic6Programs
TheUpgradingIndex,locatedbeforethecomprehensiveindex,listsin
oneplacethemajordifferencesbetweenVisualBasic6andVisual
Basic2005andprovidespagecitationstoinformationinthebookabout
thesedifferences.

“UpgradeNotes”sidebars,nearthebeginningofeachchapter,provide
abasicoverview,orexecutivesummary,ofthefeaturesinVisualBasic
2005forVisualBasic6users.Usethesesidebarsifyou'reinterestedin
howVisualBasichaschangedinthecontextofanindividualtopic,
suchasvariabledeclaration,Toolboxcontrols,ordatabase
programming.(ReadersupgradingfromVisualBasic.NET2002or
2003toVisualBasic2005arewelcometoreviewthesenotesaswell,
butmovingtoVisualBasic2005willbeeasierforyou.)


HelpfulSupportLinks
Youareinvitedtocheckoutthefollowinglinksthatprovidesupportforthe
VisualStudio2005softwareandthisbook'scontents:

VisualStudio2005SoftwareSupport
ForquestionsabouttheVisualStudio2005software,Irecommendtwo
MicrosoftWebsites:
(theMicrosoftMSDNhomepagefor
VisualBasic)
(technicalcommunitiesrelated
toMicrosoftsoftwareproductsandtechnologies)
BothWebsitesgiveyouaccesstoprofessionalVisualBasicdevelopers,
Microsoftemployees,VisualBasicblogs,newsgroups,webcasts,technical
chats,andinterestingusergroups.Foradditionalinformationaboutthese
andotherelectronicandprintedresources,seeAppendixA,“WhereToGo
ForMoreInformation.”

OnlineCompanionContent
Theonlinecompanioncontentpagehascontentandlinksrelatedtothis
book,includingalinktotheMicrosoftPressTechnologyUpdatesWebpage.

(Astechnologiesrelatedtothisbookareupdated,linkstoadditional
informationwillbeaddedtotheMicrosoftPressTechnologyUpdatesWeb
page.VisitthepageperiodicallyforupdatesonVisualStudio2005andother
technologies.)Theonlinecompanioncontentpageforthisbookcanbe
foundat:
/>
MicrosoftPressWebSite
TheMicrosoftPressWebsitehasdescriptionsforthecompletelineof


MicrosoftPressbooks,informationaboutorderingtitles,noticeofspecial
featuresandevents,additionalcontentforMicrosoftPressbooks,andmuch
more.
/>

SupportforthisBook
Everyefforthasbeenmadetoensuretheaccuracyofthisbookandthe
contentsoftheCD.Ascorrectionsorchangesarecollected,theywillbe
addedtoaMicrosoftKnowledgeBasearticleontheWeb.Toviewthelistof
knowncorrectionsforthisbook,visitthefollowingWebsite:
/>Inaddition,MicrosoftPressprovidesgeneralsupportinformationforits
booksandcompanionCDsatthefollowingWebsite:
/>
QuestionsandComments
Ifyouhavecommentsorquestionsthatarenotansweredbyvisitingthesites
above,pleasesendthemtoMicrosoftPressviae-mailto

Orviapostalmailto
MicrosoftPress
Attn:StepbyStepSeriesEditor

OneMicrosoftWay
Redmond,WA98052-6399
PleasenotethatMicrosoftsoftwareproductsupportisnotofferedthrough
theaboveaddresses.


×