Skip to main content

Wrox's Visual Basic® 2005 Express Edition Starter Kit

Wrox's Visual Basic® 2005 Express Edition Starter Kit

Andrew Parsons

ISBN: 978-0-764-59573-8

Jan 2006

384 pages

Select type: Paperback

Product not available for purchase

Description

The practical, task-oriented approach, along with numerous tips, tricks, and additional techniques, all help to get you up to speed on the most important Visual Basic 2005 concepts and information. In no time, you'll be able to take control of your programming, apply what you've learned in real world scenarios, and get quick results.

What you will learn from this book

  • How to install Visual Basic 2005 Express Edition and then navigate around the environment
  • Various details about the user interface, event programming, and accessing data
  • Ways to write proper programming code by creating additional features for your applications
  • How Visual Basic 2005 Express Edition makes XML processing, data encryption, and notification dialogs smoother processes

Who this book is for

This book is for first-time programmers who are are ready to begin creating their own customized applications with Visual Basic 2005 Express Edition. No prior programming experience is necessary.

Wrox's Visual Basic 2005 Express Edition Starter Kit gives you the software tools you need to get started. It also provides structured tutorials that walk you through all the techniques you need to begin programming right away. The accompanying CD-ROM includes:

  • Microsoft(r) Visual Basic 2005(r)Express Edition
  • Microsoft(r) MSDN(r)2005 Express Edition
  • Microsoft(r) SQL ServerTM 2005 Express Edition

Related Resources

Acknowledgments.

Introduction.

Part I: Getting Familiar.

Chapter 1: Basic Installation.

Chapter 2: Why Do All That Work?

Chapter 3: Using Databases.

Chapter 4: What the User Sees.

Chapter 5: How Do You Make That Happen?

Part II: Extending Yourself Is Good.

Chapter 6: Take Control of Your Program.

Chapter 7: Who Do You Call?

Chapter 8: It’s My World—Isn’t It?

Chapter 9: Getting into the World.

Chapter 10: When Things Go Wrong.

Part III: Making It Hum.

Chapter 11: It’s Printing Time!

Chapter 12: Using XML.

Chapter 13: Securing Your Program.

Chapter 14: Getting It Out There.

Appendix A: Need More? What’s on the CD and Website.

Appendix B: .NET—The Foundation.

Appendix C: Answers to Exercises.

Index.

  • What students learn from this book:
  • How to install Visual Basic 2005 Express Edition and then navigate around the environment
  • Various details about the user interface, event programming, and accessing data
    Ways to write proper programming code by creating additional features for your applications
  • How Visual Basic 2005 Express Edition makes XML processing, data encryption, and notification dialogs smoother processes
    • Who this book is for:
      This book is for first-time programmers who are looking to write programs with Visual Basic 2005 Express Edition and use it to solve common programming tasks.
      Wrox Starter Kits give students a CD-ROM with the software development tools they need to get started as well as structured tutorials that walk them through all the techniques they need to begin programming right away.
Code Downloads
Code downloads for this title are available here.
Download
Code from the Book in .zip format
Code downloads for this title are available here.
Download
Code Downloads
Code downloads for this title are available here.
Code from the Book in .zip format
Code downloads for this title are available here.
Code from the Book in .zip format
Here is the code from the book in .zip format.
Download
ChapterPageDetailsDatePrint Run
222URL Error
The URL for the instruction to download the "Amazon-Enabled Movie Collection Starter Kit", was modified by Microsoft to the following:

URL: http://msdn.microsoft.com/vstudio/eula.aspx?id=72a940c3-befe-4013-a08f-b9032244e414
11/07/06

73Error in Technical Text
The code execution table (below the actual code) should have the integer value of "21" for the variable "MyResult", instead of "0".
03/31/2006

76Error in Text
first paragraph:
a variable of type Decimal is declared

should read:
a variable of type Double is declared
8/03/06

78Error in Text
On page 78 the book provides the format of the IIf statement as:
IIf(Condition, TrueValue, FalseValue)

It then sets the following example for determining cake pricing:
"If chocolate cakes were priced at $2 but all other cakes were only $1, the price of a particular cake could be calculated as follows:
Price=IIF(Cake.Type="Chocolate",1,2)"

The above statement would set the price of chocolate cakes to $1 and all other cakes to $2.
04/10/2006

113Error in Text
Section 3,last line reads:
"dtpBirthdate.Value = mPerson.BirthDate" gets blue-lined, tool-tip is "Name dtpBirthdate is not declared"

In the website download code, the variable is "dtpDateOfBirth", which is declared.
05/22/2006

117Error in Code
step 3 of the Try it Out:
".Anchor = AnchorStyles.Bottom + AnchorStyles.Right"

should be:
".Anchor = CType(AnchorStyles.Bottom + AnchorStyles.Right, AnchorStyles)"
5/02/06

7126Error in Code
Chapter 7, page 126, Section 6:

When the application is run and the 'Show List' button is clicked, the list box is NOT populated with the information in the database.

The connection string specified in the application configuration XML file (app.config) does not match the database file location specified in the database properties (PO_Data.mdf) connection string. It is also the reason that the example code would not run in Chapter 8 and Chapter 9 and the problem may carry over to the later chapters as well.

Listed below are the two conflicting connection string specifications:

App.Config XML File Connection String:
<connectionStrings>
<add name="Personal_Organizer.Settings.PO_DataConnectionString"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="H:\Wiley-2\Wrox Visual Basic Express 2005 Starter Kit\Code\Chapter 9\Personal Organizer Database File\PO-Data.mdf";Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>


PO_Data.mdf Properties Connection String:
Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Documents and Settings\User Name\My Documents\Visual Studio 2005\VB_2005_Express_Code\Chapter 09\Personal Organizer Database File\PO-Data.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True

The code revisions can be found below:

Module GeneralFunctions
Public Function GetPerson(ByVal PersonID As Integer) As Person
Dim GetPersonAdapter As New _PO_DataDataSetTableAdapters.PersonTableAdapter
Dim GetPersonTable As New _PO_DataDataSet.PersonDataTable
GetPersonAdapter.Fill(GetPersonTable)
Dim PersonDataView As DataView = GetPersonTable.DefaultView
PersonDataView.RowFilter = "ID = " + PersonID.ToString
With PersonDataView
If .Count > 0 Then
Dim objPerson As New Person
With .Item(0)
objPerson.ID = CType(.Item("ID"), Integer)
objPerson.FirstName = .Item("NameFirst").ToString.Trim
objPerson.LastName = .Item("NameLast").ToString.Trim
objPerson.HomePhone = .Item("PhoneHome").ToString.Trim
objPerson.CellPhone = .Item("PhoneCell").ToString.Trim
objPerson.Address = .Item("Address").ToString.Trim
If .Item("DateOfBirth").ToString > " Then
'objPerson.BirthDate = CType(.Item("DateOfBirth"), Date)
objPerson.BirthDate = CType(.Item("DateOfBirth"), Date).Date
Else
objPerson.BirthDate = CType("1/1/1900", Date)
End If
objPerson.EmailAddress = .Item("EmailAddress").ToString.Trim
objPerson.Favorites = .Item("Favorites").ToString.Trim
If .Item("GiftCategories").ToString > " Then
'objPerson.GiftCategories = CType(.Item("GiftCategories"), Integer)
objPerson.GiftCategories = .Item("GiftCategories")
End If
objPerson.Notes = .Item("Notes").ToString.Trim
End With
Return objPerson
Else
Return Nothing
End If
End With
End Function
07/05/2006