You are previewing Visual Basic 2005: A Developer's Notebook.
O'Reilly logo
Visual Basic 2005: A Developer's Notebook

Book Description

When Microsoft introduced the Visual Basic .NET programming language, as part of its move to the .NET Framework two years ago, many developers willingly made the switch. Millions of others, however, continued to stick with Visual Basic 6. They weren't ready for such a radical change, which included an object-oriented environment similar to Java. They liked the old Visual Basic just fine. In an effort to win over those diehard VB6 developers, the company has included a new version of VB.NET in its upcoming next generation release of the Visual Studio .NET development platform. Visual Basic 2005 comes with innovative language constructs, new compiler features, dramatically enhanced productivity and an improved debugging experience. The language's new version is now available in beta release, and Microsoft is encouraging developers to give it a test drive. Visual Basic 2005: A Developer's Notebook provides the ideal test track. With nearly 50 hands-on projects, this practical introduction to VB 2005 will bring you up to speed on all the new features of this language by allowing you to work with them directly. The book summarizes the changes that VB 2005 brings, and tells you how to acquire, install and configure the beta version of VB 2005 SDK. Each project or experiment explores a different feature, with emphasis on changes that can increase productivity, simplify programming tasks, and help you add new functionality to your applications. This one-of-a-kind book also offers suggestions for further experimentation, links to on-line documentation and other sources of information, and practical notes and warnings from the author. The new Developer's Notebooks series from O'Reilly offers an in-depth first look at important new tools for software developers. Emphasizing example over explanation and practice over theory, they focus on learning by doing you'll get the goods straight from the masters, in an informal and code-intensive style. For those who want to get up speed with VB 2005 right away, this is the perfect all lab, no lecture guide.

Table of Contents

  1. Visual Basic 2005: A Developer's Notebook
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. A Note Regarding Supplemental Files
    3. The Developer's Notebook Series
      1. Notebooks Are...
      2. Notebooks Aren't...
      3. Organization
    4. Preface
      1. Who This Book Is For
      2. What You Need to Use This Book
      3. About This Book
      4. Conventions Used in This Book
      5. Using Code Examples
      6. Safari® Enabled
      7. How to Contact Us
      8. Acknowledgments
    5. 1. Visual Studio
      1. 1.1. How do I do that?
        1. 1.1.1. What about...
      2. 1.2. Code, Debug, and Continue Without Restarting Your Application
        1. 1.2.1. How do I do that?
        2. 1.2.2. What about...
      3. 1.3. Look Inside an Object While Debugging
        1. 1.3.1. How do I do that?
        2. 1.3.2. What about...
        3. 1.3.3. Where can I learn more?
      4. 1.4. Diagnose and Correct Errorson the Fly
        1. 1.4.1. How do I do that?
        2. 1.4.2. What about...
        3. 1.4.3. Where can I learn more?
      5. 1.5. Rename All Instances of Any Program Element
        1. 1.5.1. How do I do that?
        2. 1.5.2. What about...
      6. 1.6. Use IntelliSense Filteringand AutoCorrect
        1. 1.6.1. How do I do that?
        2. 1.6.2. What about...
      7. 1.7. Edit Control Properties in Place
        1. 1.7.1. How do I do that?
        2. 1.7.2. What about...
      8. 1.8. Call Methods at Design Time
        1. 1.8.1. How do I do that?
        2. 1.8.2. Where can I learn more?
      9. 1.9. Insert Boilerplate CodeUsing Snippets
        1. 1.9.1. How do I do that?
        2. 1.9.2. What about...
        3. 1.9.3. Where can I learn more?
      10. 1.10. Create XML Documentation for Your Code
        1. 1.10.1. How do I do that?
        2. 1.10.2. What about...
        3. 1.10.3. Where can I learn more?
    6. 2. The Visual Basic Language
      1. 2.1. Use the My Objects to Program Common Tasks
        1. 2.1.1. How do I do that?
        2. 2.1.2. Where can I learn more?
      2. 2.2. Get Application Information
        1. 2.2.1. How do I do that?
        2. 2.2.2. What about...
      3. 2.3. Use Strongly Typed Resources
        1. 2.3.1. How do I do that?
        2. 2.3.2. What about...
      4. 2.4. Use Strongly Typed Configuration Settings
        1. 2.4.1. How do I do that?
        2. 2.4.2. What about...
      5. 2.5. Build Typesafe Generic Classes
        1. 2.5.1. How do I do that?
        2. 2.5.2. What about...
      6. 2.6. Make Simple Data Types Nullable
        1. 2.6.1. How do I do that?
        2. 2.6.2. What about...
        3. 2.6.3. Where can I learn more?
      7. 2.7. Use Operators with Custom Objects
        1. 2.7.1. How do I do that?
        2. 2.7.2. What about...
        3. 2.7.3. Where can I learn more?
      8. 2.8. Split a Class into Multiple Files
        1. 2.8.1. How do I do that?
        2. 2.8.2. What about...
        3. 2.8.3. Where can I learn more?
      9. 2.9. Extend the My Namespace
        1. 2.9.1. How do I do that?
        2. 2.9.2. What about...
      10. 2.10. Skip to the Next Iteration of a Loop
        1. 2.10.1. How do I do that?
        2. 2.10.2. What about...
        3. 2.10.3. Where can I learn more?
      11. 2.11. Dispose of Objects Automatically
        1. 2.11.1. How do I do that?
        2. 2.11.2. What about...
        3. 2.11.3. Where can I learn more?
      12. 2.12. Safeguard Properties with Split Accessibility
        1. 2.12.1. How do I do that?
        2. 2.12.2. What about...
      13. 2.13. Evaluate Conditions Separately with Short-Circuit Logic
        1. 2.13.1. How do I do that?
        2. 2.13.2. What about...
    7. 3. Windows Applications
      1. 3.1. Use Office-Style Toolbars
        1. 3.1.1. How do I do that?
        2. 3.1.2. What about...
        3. 3.1.3. Where can I learn more?
      2. 3.2. Add Any Control to a ToolStrip
        1. 3.2.1. How do I do that?
        2. 3.2.2. What about...
        3. 3.2.3. Where can I learn more?
      3. 3.3. Add Icons to Your Menu
        1. 3.3.1. How do I do that?
        2. 3.3.2. What about...
      4. 3.4. Put the Web in a Window
        1. 3.4.1. How do I do that?
        2. 3.4.2. What about...
        3. 3.4.3. Where can I learn more?
      5. 3.5. Validate Input While the User Types
        1. 3.5.1. How do I do that?
        2. 3.5.2. What about...
      6. 3.6. Create Text Boxes thatAuto-Complete
        1. 3.6.1. How do I do that?
        2. 3.6.2. What about...
      7. 3.7. Play a Windows System Sound
        1. 3.7.1. How do I do that?
        2. 3.7.2. What about...
      8. 3.8. Play Simple WAV Audio
        1. 3.8.1. How do I do that?
        2. 3.8.2. What about...
      9. 3.9. Create a Windows Explorer-like Split Window
        1. 3.9.1. How do I do that?
        2. 3.9.2. What about...
        3. 3.9.3. Where can I learn more?
      10. 3.10. Take Control of Window Layout
        1. 3.10.1. How do I do that?
        2. 3.10.2. What about...
        3. 3.10.3. Where can I learn more?
      11. 3.11. Control When Your Application Shuts Down
        1. 3.11.1. How do I do that?
        2. 3.11.2. What about...
        3. 3.11.3. Where can I learn more?
      12. 3.12. Prevent Your Application from Starting Twice
        1. 3.12.1. How do I do that?
        2. 3.12.2. What about...
        3. 3.12.3. Where can I learn more?
      13. 3.13. Communicate Between Forms
        1. 3.13.1. How do I do that?
        2. 3.13.2. What about...
      14. 3.14. Improve Redraw Speeds for GDI+
        1. 3.14.1. How do I do that?
        2. 3.14.2. What about...
        3. 3.14.3. Where can I learn more?
      15. 3.15. Handle Asynchronous Tasks Safely
        1. 3.15.1. How do I do that?
        2. 3.15.2. What about...
        3. 3.15.3. Where can I learn more?
      16. 3.16. Use a Better Data-Bound Grid
        1. 3.16.1. How do I do that?
        2. 3.16.2. What about...
      17. 3.17. Format the DataGridView
        1. 3.17.1. How do I do that?
        2. 3.17.2. What about...
      18. 3.18. Add Images and Controls to the DataGridView
        1. 3.18.1. How do I do that?
        2. 3.18.2. Where can I learn more?
    8. 4. Web Applications
      1. 4.1. Create a Web Application in Visual Studio 2005
        1. 4.1.1. How do I do that?
        2. 4.1.2. What about...
        3. 4.1.3. Where can I learn more?
      2. 4.2. Administer a Web Application
        1. 4.2.1. How do I do that?
        2. 4.2.2. What about...
        3. 4.2.3. Where can I learn more?
      3. 4.3. Bind to Data Without Writing Code
        1. 4.3.1. How do I do that?
        2. 4.3.2. What about...
        3. 4.3.3. Where can I learn more?
      4. 4.4. Bind Web Controls to a Custom Class
        1. 4.4.1. How do I do that?
        2. 4.4.2. What about...
        3. 4.4.3. Where can I learn more?
      5. 4.5. Display Interactive Tables Without Writing Code
        1. 4.5.1. How do I do that?
        2. 4.5.2. What about...
      6. 4.6. Display Records One at a Time
        1. 4.6.1. How do I do that?
        2. 4.6.2. What about...
      7. 4.7. Achieve a Consistent Look and Feel with Master Pages
        1. 4.7.1. How do I do that?
        2. 4.7.2. What about...
        3. 4.7.3. Where can I learn more?
      8. 4.8. Add Navigation to Your Site
        1. 4.8.1. How do I do that?
        2. 4.8.2. What about...
      9. 4.9. Easily Authenticate Users
        1. 4.9.1. How do I do that?
        2. 4.9.2. What about...
      10. 4.10. Determine How Many People Are Currently Using Your Web Site
        1. 4.10.1. How do I do that?
        2. 4.10.2. What about...
      11. 4.11. Use Role-Based Authorization
        1. 4.11.1. How do I do that?
        2. 4.11.2. What about...
        3. 4.11.3. Where can I learn more?
      12. 4.12. Store Personalized Information
        1. 4.12.1. How do I do that?
        2. 4.12.2. What about...
        3. 4.12.3. Where can I learn more?
    9. 5. Files, Databases, and XML
      1. 5.1. Get Drive Information
        1. 5.1.1. How do I do that?
        2. 5.1.2. What about...
        3. 5.1.3. Where can I learn more?
      2. 5.2. Get File and Directory Information
        1. 5.2.1. How do I do that?
        2. 5.2.2. What about...
      3. 5.3. Copy, Move, and Delete Files
        1. 5.3.1. How do I do that?
        2. 5.3.2. What about...
      4. 5.4. Read and Write Files
        1. 5.4.1. How do I do that?
        2. 5.4.2. What about...
      5. 5.5. Compress and Decompress Data
        1. 5.5.1. How do I do that?
        2. 5.5.2. What about...
        3. 5.5.3. Where can I learn more?
      6. 5.6. Collect Statistics on Your Data Connections
        1. 5.6.1. How do I do that?
        2. 5.6.2. What about...
      7. 5.7. Batch DataAdapter Commands for Better Performance
        1. 5.7.1. How do I do that?
        2. 5.7.2. What about...
      8. 5.8. Bulk-Copy Rows from One Table to Another
        1. 5.8.1. How do I do that?
        2. 5.8.2. What about...
        3. 5.8.3. Where can I learn more?
      9. 5.9. Write Database-Agnostic Code
        1. 5.9.1. How do I do that?
        2. 5.9.2. What about...
        3. 5.9.3. Where can I learn more?
      10. 5.10. Use the New XPathDocument and XPathNavigator
        1. 5.10.1. How do I do that?
        2. 5.10.2. What about...
        3. 5.10.3. Where can I learn more?
      11. 5.11. Edit an XML Document with XPathNavigator
        1. 5.11.1. How do I do that?
        2. 5.11.2. What about...
        3. 5.11.3. Where can I learn more?
    10. 6. .NET 2.0 Platform Services
      1. 6.1. Easily Log Events
        1. 6.1.1. How do I do that?
        2. 6.1.2. What about...
        3. 6.1.3. Where can I learn more?
      2. 6.2. Ping Another Computer
        1. 6.2.1. How do I do that?
        2. 6.2.2. What about...
        3. 6.2.3. Where can I learn more?
      3. 6.3. Get Information About a Network Connection
        1. 6.3.1. How do I do that?
        2. 6.3.2. What about...
        3. 6.3.3. Where can I learn more?
      4. 6.4. Upload and Download Files with FTP
        1. 6.4.1. How do I do that?
        2. 6.4.2. Where can I learn more?
      5. 6.5. Test Group Membership of the Current User
        1. 6.5.1. How do I do that?
      6. 6.6. Encrypt Secrets for the Current User
        1. 6.6.1. How do I do that?
        2. 6.6.2. What about...
      7. 6.7. Unleash the Console
        1. 6.7.1. How do I do that?
        2. 6.7.2. What about...
        3. 6.7.3. Where can I learn more?
      8. 6.8. Time Your Code
        1. 6.8.1. How do I do that?
        2. 6.8.2. What about...
      9. 6.9. Deploy Your Application with ClickOnce
        1. 6.9.1. How do I do that?
        2. 6.9.2. What about...
        3. 6.9.3. Where can I learn more?
    11. Index
    12. About the Author
    13. Colophon
    14. SPECIAL OFFER: Upgrade this ebook with O’Reilly