Introduction and controls, how your code should handle unexpected events, what object-oriented programming is, how to use it in your applications, and so on)we@ll show you some of the areas you might want to try your hand at next a Chapters 1 through 8 provide an introduction to Visual Studio 2005 and Windows programmin a Chapter 9 provides an introduction to application debugging and error handling u Chapters 10 through 12 provide an introduction to object-oriented programming and building objects o Chapters 13 and 14 provide an introduction to graphics in Windows applications o Chapters 15 and 16 provide an introduction to programming with databases and covers Access, QL Server, and ADO. NET. u Chapter 17 provides an introduction to ASP NET and shows you how to write applications for the web a Chapter 19 provides a brief introduction to XML; a powerful tool for integrating your applica tions with others--regardless of the language they were written in. Chapter 20 introduces you to Web Services; a technology whereby functionality offered on the Internet can be accessed by your applications and seamlessly integrated into them o Chapter 21 introduces you to building applications for mobile devices using the Compact What do need to run visual basic 2005? Apart from a willingness to learn, all you'll need for the first 14 chapters are a PC running Windows 2000, Windows XP (Home or Professional Edition), or Windows Server 2003; Internet Explorer; and of course u Microsoft Visual Basic 2005 Express Edition o Microsoft Visual Basic 2005 Standard Edition o Microsoft Visual Basic 2005 Professional Edition Microsoft Visual Basic 2005 Team System As the later chapters cover more advanced subject areas, you will need other software to get the most out of them. Also, Visual Basic 2005 Express does not support creating Web applications, mobile applica- tions, and deployment projec XXX
xxx Introduction and controls, how your code should handle unexpected events, what object-oriented programming is, how to use it in your applications, and so on) we’ll show you some of the areas you might want to try your hand at next: ❑ Chapters 1 through 8 provide an introduction to Visual Studio 2005 and Windows programming. ❑ Chapter 9 provides an introduction to application debugging and error handling. ❑ Chapters 10 through 12 provide an introduction to object-oriented programming and building objects. ❑ Chapters 13 and 14 provide an introduction to graphics in Windows applications. ❑ Chapters 15 and 16 provide an introduction to programming with databases and covers Access, SQL Server, and ADO.NET. ❑ Chapter 17 provides an introduction to ASP.NET and shows you how to write applications for the Web. ❑ Chapter 19 provides a brief introduction to XML; a powerful tool for integrating your applications with others—regardless of the language they were written in. ❑ Chapter 20 introduces you to Web Services; a technology whereby functionality offered on the Internet can be accessed by your applications and seamlessly integrated into them. ❑ Chapter 21 introduces you to building applications for mobile devices using the Compact Framework classes. What Do I Need to Run Visual Basic 2005? Apart from a willingness to learn, all you’ll need for the first 14 chapters are a PC running Windows 2000, Windows XP (Home or Professional Edition), or Windows Server 2003; Internet Explorer; and of course: ❑ Microsoft Visual Basic 2005 Express Edition or ❑ Microsoft Visual Basic 2005 Standard Edition or ❑ Microsoft Visual Basic 2005 Professional Edition or ❑ Microsoft Visual Basic 2005 Team System As the later chapters cover more advanced subject areas, you will need other software to get the most out of them. Also, Visual Basic 2005 Express does not support creating Web applications, mobile applications, and deployment projects: 03_574019 flast.qxd 9/16/05 9:48 PM Page xxx
Introduction a Chapter 15 requires Microsoft Access 2000 u For Chapter 16, you will need to have access Server 2000, SQL Server 2005, or SQL Server 2005 Express Don't worry if you don t have these products already and want to wait a while before you purchase them. You should still find that you get a lot out of this book. Conventions Weve used a number of different styles of text and layout in this book to help differentiate between the different kinds of information. Here are examples of the styles we use and an explanation of what they mean. Try It Out How Do They Work? 1. Each step has a number. 2. Follow the steps 3. Then read the subsequent"How It Works" to find out what's going on. Background information, asides, and references appear in text like this o Bullets appear indented, with each new bullet marked like this. Code has several styles. If it's a word that were talking about in the text--for example, when discussing a For . Next loop, it's in this font If it's a block of code that can be typed as a program and run, it's also in a gray box: Private Sub btnAdd_Click(By Val sender As System Object ByVal e As System. EventArgs) Handles btnAdd Click Dim n As int ssageBox Show(n) End Sub Sometimes you'll see code in a mixture of styles, like this: Private Sub btnAdd click(ByVal sender As System Object ByVal e As System. EventArgs) Handles btnAdd Click Dim n As Integer n=n+2 essageBox Show(n) In cases like this, the code with a white background is code that Visual Studio 2005 has automatically generated (in a Try It Out)or code you are already familiar with(in a How It Works); the lines high lighted in gray is a new addition to the code
xxxi Introduction ❑ Chapter 15 requires Microsoft Access 2000. ❑ For Chapter 16, you will need to have access to SQL Server 2000, SQL Server 2005, or SQL Server 2005 Express. Don’t worry if you don’t have these products already and want to wait a while before you purchase them. You should still find that you get a lot out of this book. Conventions We’ve used a number of different styles of text and layout in this book to help differentiate between the different kinds of information. Here are examples of the styles we use and an explanation of what they mean. Try It Out How Do They Work? 1. Each step has a number. 2. Follow the steps through. 3. Then read the subsequent “How It Works” to find out what’s going on. Background information, asides, and references appear in text like this. ❑ Bullets appear indented, with each new bullet marked like this. Code has several styles. If it’s a word that we’re talking about in the text—for example, when discussing a For . . . Next loop, it’s in this font. If it’s a block of code that can be typed as a program and run, it’s also in a gray box: Private Sub btnAdd_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnAdd.Click Dim n As Integer n = 27 MessageBox.Show(n) End Sub Sometimes you’ll see code in a mixture of styles, like this: Private Sub btnAdd_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnAdd.Click Dim n As Integer n = 27 n = n + 2 MessageBox.Show(n) End Sub In cases like this, the code with a white background is code that Visual Studio 2005 has automatically generated (in a Try It Out) or code you are already familiar with (in a How It Works); the lines highlighted in gray is a new addition to the code. 03_574019 flast.qxd 9/16/05 9:48 PM Page xxxi
Introduction Customer Support We always value hearing from our readers, and we want to know what you think about this book: what you liked, what you didn,' t like, and what you think we can do better next time. You can send us your comments by e-mail to feedbackewrox. com. Please be sure to mention the book title in your message. How to Download the Sample Code for the book Whenyouvisitthewroxsitewww.wroxcom/,simplylocatethetitlethroughoursEarchfacilityor by using one of the title lists. Click Download in the Code column or Download Code on the book etail page The files that are available for download from our site have been archived using WinZip. When you have saved the attachments to a folder on your hard drive, you need to extract the files using a decom- pression program such as WinZip, PKUnzip, or Ultimate Zip. When you extract the files, the code is usu- ally extracted into chapter folders. When you start the extraction process, ensure that your decompression software is set to use folder names Errata We ve made every effort to make sure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you find an error in one of our books, like a spelling mistake or a faulty piece of code, we would be very grateful to have your feedback By sending in errata, you may ave another reader from hours of frustration, and of course, you will be helping us provide even higher quality information. Simply e-mail the information to supportewrox. com; your information will be necked and, if correct, posted to the errata page for that title or used in subsequent editions of the book. TofinderrataontheWebsitegotowww.wrox.com/,andsimplylocatethetitlethroughourAdvanced Search or title list. Click the Book Errata link, which is below the cover graphic on the books detail page If you wish to query a problem in the book directly with an expert who knows the book in detail, then e-mail supportewrox com, with the title of the book and the last four numbers of the isBn in the sub ject field of the e-mail. a typical e-mail should include the following things o The title of the book, last four digits of the ISBN (4019), and page number of the problem in the u Your name, contact information, and the problem in the body of the message We won't send you junk mail. We need the details to save your time and ours. When you send an e-mail message, it will go through the following chain of support: o Customer Support-Your message is delivered to our customer support staff, who are the first people to read it. They have files on most frequently asked questions and will answer anything eneral about the book or the Web site immediately. o Editorial-Deeper queries are forwarded to the technical editors responsible for that book. They have experience with the programming language or particular product and are able to answer detailed technical questions on the subject xxii
xxxii Introduction Customer Support We always value hearing from our readers, and we want to know what you think about this book: what you liked, what you didn’t like, and what you think we can do better next time. You can send us your comments by e-mail to feedback@wrox.com. Please be sure to mention the book title in your message. How to Download the Sample Code for the Book When you visit the Wrox site, www.wrox.com/, simply locate the title through our Search facility or by using one of the title lists. Click Download in the Code column or Download Code on the book’s detail page. The files that are available for download from our site have been archived using WinZip. When you have saved the attachments to a folder on your hard drive, you need to extract the files using a decompression program such as WinZip, PKUnzip, or UltimateZip. When you extract the files, the code is usually extracted into chapter folders. When you start the extraction process, ensure that your decompression software is set to use folder names. Errata We’ve made every effort to make sure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you find an error in one of our books, like a spelling mistake or a faulty piece of code, we would be very grateful to have your feedback. By sending in errata, you may save another reader from hours of frustration, and of course, you will be helping us provide even higher quality information. Simply e-mail the information to support@wrox.com; your information will be checked and, if correct, posted to the errata page for that title or used in subsequent editions of the book. To find errata on the Web site, go to www.wrox.com/, and simply locate the title through our Advanced Search or title list. Click the Book Errata link, which is below the cover graphic on the book’s detail page. If you wish to query a problem in the book directly with an expert who knows the book in detail, then e-mail support@wrox.com, with the title of the book and the last four numbers of the ISBN in the subject field of the e-mail. A typical e-mail should include the following things: ❑ The title of the book, last four digits of the ISBN (4019), and page number of the problem in the Subject field ❑ Your name, contact information, and the problem in the body of the message We won’t send you junk mail. We need the details to save your time and ours. When you send an e-mail message, it will go through the following chain of support: ❑ Customer Support—Your message is delivered to our customer support staff, who are the first people to read it. They have files on most frequently asked questions and will answer anything general about the book or the Web site immediately. ❑ Editorial—Deeper queries are forwarded to the technical editors responsible for that book. They have experience with the programming language or particular product and are able to answer detailed technical questions on the subject. 03_574019 flast.qxd 9/16/05 9:48 PM Page xxxii
Introduction o The authors--Finally, in the unlikely event that the editor cannot answer your problem, they will forward the request to the author. We do try to protect the author from any distractions to their writing; however, we are quite happy to forward specific requests to them. All Wrox authors help with the support on their books. They will e-mail the customer and the editor with their response, and again all readers should benefit. The Wrox Support process can offer support only to issues that are directly pertinent to the content of our published title. Support for questions that fall outside the scope of normal book support is provided viathecommunitylistsathttp://p2p.wroxcom/forum. p2p wrox. com For author and peer discussions, join the P2P mailing lists. Our unique system provides programmer-to programmer contact on mailing lists, forums, and newsgroups, all in addition to our one-to-one e-mail support system. If you post a query to P2P, you can be confident that it is being examined by many wrox luthors and other industry experts who are present on our mailing lists. At p2p wrox. com you will find number of different lists that will help you, not only while you read this book, but also as you develop your own applications. Particularly appropriate to this book are the beginning_vb and vb_dotnet To subscribe to a mailing list just follow these steps 2. Choose the appropriate category from the left menu bar. 3. Click the mailing list you wish to join. 4. Follow the instructions to subscribe and fill in your e-mail address and password 5. Reply to the confirmation e-mail you receive 6. Use the subscription manager to join more lists and set your e-mail preferences Why This System Offers the Best Support You can choose to join the mailing lists, or you can receive them as a weekly digest. If you don' t have the time, or facility, to receive the mailing list, you can search our online archives. Junk mails and spam are deleted, and your own e-mail address is protected by the unique Lyris system. Queries about joining or leavinglistsandanyothergeneralqueriesaboutlistsshouldbesenttolistsupportep2p.wrox.com. xxxiii
xxxiii Introduction ❑ The authors—Finally, in the unlikely event that the editor cannot answer your problem, they will forward the request to the author. We do try to protect the author from any distractions to their writing; however, we are quite happy to forward specific requests to them. All Wrox authors help with the support on their books. They will e-mail the customer and the editor with their response, and again all readers should benefit. The Wrox Support process can offer support only to issues that are directly pertinent to the content of our published title. Support for questions that fall outside the scope of normal book support is provided via the community lists at http://p2p.wrox.com/forum. p2p.wrox.com For author and peer discussions, join the P2P mailing lists. Our unique system provides programmer-toprogrammer contact on mailing lists, forums, and newsgroups, all in addition to our one-to-one e-mail support system. If you post a query to P2P, you can be confident that it is being examined by many Wrox authors and other industry experts who are present on our mailing lists. At p2p.wrox.com you will find a number of different lists that will help you, not only while you read this book, but also as you develop your own applications. Particularly appropriate to this book are the beginning_vb and vb_dotnet lists. To subscribe to a mailing list just follow these steps: 1. Go to http://p2p.wrox.com/. 2. Choose the appropriate category from the left menu bar. 3. Click the mailing list you wish to join. 4. Follow the instructions to subscribe and fill in your e-mail address and password. 5. Reply to the confirmation e-mail you receive. 6. Use the subscription manager to join more lists and set your e-mail preferences. Why This System Offers the Best Support You can choose to join the mailing lists, or you can receive them as a weekly digest. If you don’t have the time, or facility, to receive the mailing list, you can search our online archives. Junk mails and spam are deleted, and your own e-mail address is protected by the unique Lyris system. Queries about joining or leaving lists, and any other general queries about lists, should be sent to listsupport@p2p.wrox.com. 03_574019 flast.qxd 9/16/05 9:48 PM Page xxxiii
03_574019 flast.qxd 9/16/05 9:48 PM Page xxxiv