Visual Basic 2008 For Dummies
eBook - ePub

Visual Basic 2008 For Dummies

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Visual Basic 2008 For Dummies

About this book

Visual Basic is a favorite programming language, so if you're new to programming, it's a great place to start. Visual Basic 2008 For Dummies is the fun and easy way to begin creating applications right away while you get the hang of using the Visual Studio environment. Soon you'll be building all sorts of useful stuff with VB 2008!

This step-by-step guide walks you through a logical series of tasks that build your skills as you get comfortable with.Net terminology, theory, tools, and design principles. You'll learn how to build an application in four different architectural styles, and you'll find out how to make your programs validate input and output, make decisions, and protect themselves from security threats. Discover how to:

  • Install the Visual Studio environment
  • Write a VB program
  • Use Web forms, Windows forms, and Web services
  • Establish good programming practices
  • Create class libraries
  • Write secure applications
  • Debug your applications
  • Work with strings and "if-then" statements
  • Iterate with counted and nested loops
  • Pass arguments and get return values
  • Access data with VB.NET
  • Work with the file system using VB

You'll also find great tips for working with the VB user interface, using VB.NET in C# programming, troubleshooting your VB programs, taking your programming to the next level, and more! Once you get your hands on Visual Basic 2008 For Dummies, you'll be programming like a genius in no time!

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Visual Basic 2008 For Dummies by Bill Sempf in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Languages. We have over one million books available in our catalogue for you to explore.

Information

Part I

Getting to Know .NET Using Visual Basic

In this part . . .
Everyone must start somewhere, and I start at the beginning in this part. You write your first Visual Basic program, and, in doing so, you discover some of the ideas behind the .NET Framework (the backbone of this version of the language). You then get to do the only required reading in this entire book. First, you go over the use of the tool, Visual Studio. Second, you design the example application that you write in the next part.
Chapter 1

Wading into Visual Basic

In This Chapter

bullet
Seeing where Visual Basic fits in with .NET
bullet
Writing your first Visual Basic 2008 program
bullet
Exploiting the newfound power of Visual Basic
To get started with Visual Basic 2008, I recommend that you jump right in and write software! And to help you with such an assertive approach, this chapter gives you just what you need to test the waters of the Visual Basic pool and get comfortable with its place in the larger Visual Studio environment.
Then you can really get your feet wet as you build Hello World — your first VB 2008 Windows Forms application — right here in the first few pages! You find out how to launch Visual Studio 2008 (the development tool for your VB applications), how to start a new project, and how to build a form visually and make it work with code.
Also in this chapter, I give you a glimpse into the deeper power of Visual Basic. Specifically, I introduce how VB 2008 integrates with the Microsoft .NET Framework and offer insight into what that means to you as a programmer.

Visual Basic’s Role in the Framework

Microsoft created the .NET Framework to make development for the various Windows operating systems easier. But because of the differences between Visual Basic 6.0 and Visual Basic 7.0 (the first .NET version), most VB developers found development much harder. For example, VB 7.0 made all variables into objects, which removed the programmer’s ability to define a variable type on the fly.
But developing applications in .NET doesn’t have to be harder than it was in VB 6.0. The .NET Framework and Visual Basic 2008 can be powerful tools, and the trick is discovering how they work together through the Visual Studio Integrated Development Environment (IDE).
Part of the difficulty that many programmers face when moving to the .NET Framework is the terminology, which can get confusing. I’d like to put the problem with terminology to bed right now, so check out this list of the potentially confusing terms used in .NET development:
bullet
Visual Basic 2008: The programming language described throughout this whole book. No longer can you run or load Visual Basic as a separate entity. It is simply one programming language that speaks to the Microsoft .NET Framework, which is the next term in the list.
bullet
.NET Framework: The layer that sits between the language (in this case, Visual Basic) and the operating system, which can be Windows 98, Windows Me, Windows 2000, Windows XP, Windows Server 2003, or any of the subversions of those (such as the Tablet PC edition). The .NET Framework layer serves to provide functionality based on the operation of the Windows system on which it resides, as well as to provide libraries for other functionality (such as math computations and database access). Figure 1-1 is a visual representation of the relationship of all the layers in the framework.
bullet
Visual Studio 2008: The tool that you use to create any kind of application using any compatible programming language. Visual Studio replaces the Visual Basic 6.0 program that was formerly part of the Visual Studio suite (all individual suite components were labeled Version 6.0). When you go to write a new program in the .NET environment, you run Visual Studio 2008 and select the kind of program you want to write in the programming language you want to use. For example, you may choose to create a Windows Forms program using the Visual Basic language, just like the old days. Or you might want to write an application for a smart device using C#. You can also mix languages, for example, writing the forms in VB and the classes in C#. In this book, I will be using VB for everything — because it is a book about VB!
Figure 1-1: The .NET Framework hierarchy.
Figure 1-1: The .NET Framework hierarchy.
bullet
Windows Forms: The new term for an old-fashioned Visual Basic application. This term refers to an application that is written using the .NET Framework and has a Windows user interface.
bullet
Web Forms: The term for an application with a Web page interface written using the .NET Framework. Creating a Web Forms application is very similar to writing a Windows Forms application.
bullet
Web services: The class libraries that are written using a standard defined by the same people who defined standards for the World Wide Web. Web services are used for interaction between divergent sys...

Table of contents

  1. Title
  2. Contents
  3. Introduction
  4. Part I : Getting to Know .NET Using Visual Basic
  5. Chapter 1: Wading into Visual Basic
  6. Chapter 2: Using Visual Studio 2008
  7. Chapter 3: Designing Applications in VB 2008
  8. Part II : Building Applications with VB 2008
  9. Chapter 4: Building Windows Applications
  10. Chapter 5: Building Web Applications
  11. Chapter 6: Building Class Libraries
  12. Chapter 7: Building Web Services
  13. Chapter 8: Debugging in VB 2008
  14. Part III : Making Your Programs Work
  15. Chapter 9: Interpreting Strings and Things
  16. Chapter 10: Making Decisions in Code
  17. Chapter 11: Getting Loopy
  18. Chapter 12: Reusing Code
  19. Chapter 13: Making Arguments, Earning Returns
  20. Part IV : Digging into the Framework
  21. Chapter 14: Writing Secure Code
  22. Chapter 15: Accessing Data
  23. Chapter 16: Working with the File System
  24. Chapter 17: Accessing the Internet
  25. Chapter 18: Creating Images
  26. Part V : The Part of Tens
  27. Chapter 19: Ten Tips for Using the VB User Interface
  28. Chapter 20: Ten Ideas for Taking Your Next Programming Step
  29. Chapter 21: Ten Resources on the Internet
  30. : Further Reading