Sams Teach Yourself Visual Basic 2012 in 24 Hours, Complete Starter Kit

Overview

In just 24 sessions of one hour or less, you’ll learn how to build complete, reliable, and modern applications with Visual Basic 2012. Using this book’s straightforward, step-by-step approach, you’ll master the entire process, from navigating VB 2012 to deploying finished solutions. You’ll learn how to write efficient object-oriented code; build superior user interfaces; work with graphics, text, and databases; and even control external applications. Each lesson builds on what you’ve already learned, giving you a...

See more details below
Paperback
$25.90
BN.com price
(Save 25%)$34.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (13) from $19.04   
  • New (9) from $19.04   
  • Used (4) from $19.22   
Sams Teach Yourself Visual Basic 2012 in 24 Hours

Available on NOOK devices and apps  
  • NOOK Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study

Want a NOOK? Explore Now

NOOK Book (eBook)
$15.49
BN.com price
(Save 44%)$27.99 List Price

Overview

In just 24 sessions of one hour or less, you’ll learn how to build complete, reliable, and modern applications with Visual Basic 2012. Using this book’s straightforward, step-by-step approach, you’ll master the entire process, from navigating VB 2012 to deploying finished solutions. You’ll learn how to write efficient object-oriented code; build superior user interfaces; work with graphics, text, and databases; and even control external applications. Each lesson builds on what you’ve already learned, giving you a strong, practical foundation for success!

Step-by-step instructions carefully walk you through the most common Visual Basic 2012 tasks.

Quizzes and Exercises at the end of each chapter help you test your knowledge.

By the Way notes present interesting information related to the discussion.

Did You Know? tips offer advice or show you easier ways to perform tasks.

Watch Out! cautions alert you to possible problems and give you advice on how to avoid them.

Learn how to…

  • Navigate the VB 2012 environment and use VB’s powerful new tools
  • Work with objects, collections, and events
  • Build attractive, highly functional user interfaces
  • Make the most of VB 2012’s advanced controls
  • Create efficient modules and reusable procedures
  • Store data, make decisions in code, and use loops to improve efficiency
  • Use powerful object-oriented programming techniques
  • Interact effectively with users
  • Work with graphics, text files, and databases
  • Debug and troubleshoot applications
  • Manipulate external applications, file systems, and the Windows Registry
  • Distribute the software you’ve created

On the Web:

  • Access code examples from the book, as well as updates, and corrections as they become available at informit.com/title/9780672336294
  • Download Visual Studio 2012 Express for Windows Desktop from www.microsoft.com/visualstudio/eng/downloads
Read More Show Less

Product Details

  • ISBN-13: 9780672336294
  • Publisher: Sams
  • Publication date: 10/22/2012
  • Series: Sams Teach Yourself -- Hours Series
  • Edition number: 1
  • Pages: 528
  • Sales rank: 386,951
  • Product dimensions: 6.90 (w) x 9.00 (h) x 1.20 (d)

Meet the Author

James Foxall is president of Tigerpaw Software, Inc. (www.tigerpawsoftware.com), a Bellevue, Nebraska, Microsoft Certified Partner specializing in software solutions for technology providers. Tigerpaw’s award-winning business automation solution is designed to automate contact management, marketing, service and repair, proposal generation, inventory control, and purchasing. At the start of 2012, the current release of Tigerpaw had more than 35,000 licensed users. Foxall’s experience in creating certified Office-compatible software has made him an authority on application interface and behavior standards of applications for the Microsoft Windows and Microsoft Office environments.

Foxall has been writing commercial production Visual Basic code for more than 14 years. He’s the author of numerous books, including Practical Standards for Microsoft Visual Basic and MCSD in a Nutshell: The Visual Basic Exams. He also has written articles for Access-Office-VBA Advisor and Visual Basic Programmer’s Journal. Foxall has a bachelor’s degree in management of information systems (MIS) and a master’s degree in Business Administration (MBA). He is a Microsoft Certified Solution Developer and an international speaker on programming technologies as well as business process improvements. James enjoys spending time with his family, playing guitar, listening to amazing bands, and playing computer games. You can reach him at www.jamesfoxall.com.

Read More Show Less

Table of Contents

Introduction 1

PART I: The Visual Basic 2012 Environment

HOUR 1: Jumping in with Both Feet: A Visual Basic 2012 Programming Tour 5

Starting Visual Basic 2012 . . . . . . . . . 6

Creating a New Project . . . . . . . . . . 7

Understanding the Visual Studio 2012 Environment . . . . . 10

Changing the Characteristics of Objects . . . . . . . 11

Adding Controls to a Form. . . . . . . . . 16

Designing an Interface . . . . . . . . . 17

Writing the Code Behind an Interface . . . . . . . 21

Running a Project . . . . . . . . . . 25

HOUR 2: Navigating Visual Basic 2012 29

Using the Visual Basic 2012 Start Page . . . . . . . 30

Navigating and Customizing the Visual Basic Environment. . . 32

Working with Toolbars. . . . . . . . . . 37

Adding Controls to a Form Using the Toolbox . . . . . . 38

Setting Object Properties Using the Properties Window . . . . 39

Managing Projects . . . . . . . . . . 45

A Quick-and-Dirty Programming Primer . . . . . . 51

Getting Help . . . . . . . . . . . 53

HOUR 3: Understanding Objects and Collections 57

Understanding Objects. . . . . . . . . . 58

Understanding Properties . . . . . . . . . 58

Understanding Methods. . . . . . . . . 65

Building a Simple Object Example Project. . . . . . 67

Understanding Collections . . . . . . . . . 72

Using the Object Browser . . . . . . . . . 75

HOUR 4: Understanding Events 79

Understanding Event-Driven Programming . . . . . . 79

Building an Event Example Project . . . . . . . 87

Keeping Event Names Current . . . . . . . . 92

PART II: Building a User Interface

HOUR 5: Building Forms: The Basics 95

Changing a Form’s Name . . . . . . . . . 96

Changing a Form’s Appearance . . . . . . . . 97

Showing and Hiding Forms. . . . . . . . . 107

HOUR 6: Building Forms: Advanced Techniques 117

Working with Controls . . . . . . . . . 117

Creating Topmost Nonmodal Windows. . . . . . . 134

Creating Transparent Forms . . . . . . . . 135

Creating Scrollable Forms. . . . . . . . . 135

Creating MDI Forms . . . . . . . . . . 137

Setting the Startup Form. . . . . . . . . 140

HOUR 7: Working with Traditional Controls 145

Displaying Static Text with the Label Control . . . . . 145

Allowing Users to Enter Text Using a Text Box . . . . . 146

Creating Buttons. . . . . . . . . . 153

Creating Containers and Groups of Option Buttons . . . . 157

Displaying a List with the List Box . . . . . . . 161

Creating Drop-Down Lists Using the Combo Box . . . . . 168

HOUR 8: Using Advanced Controls 173

Creating Timers . . . . . . . . . . 174

Creating Tabbed Dialog Boxes. . . . . . . . 177

Storing Pictures in an Image List Control. . . . . . 180

Building Enhanced Lists Using the List View Control . . . . 182

Creating Hierarchical Lists Using the

Tree View Control. . . . . . . . . . 187

HOUR 9: Adding Menus and Toolbars to Forms 195

Building Menus . . . . . . . . . . 196

Using the Toolbar Control. . . . . . . . . 207

Creating a Status Bar. . . . . . . . . . 213

PART III: Making Things Happen–Programming

HOUR 10: Creating and Calling Code Procedures 217

Creating Visual Basic Code Modules. . . . . . . 217

Writing Code Procedures . . . . . . . . . 219

Calling Code Procedures. . . . . . . . . 225

Exiting Procedures. . . . . . . . . . 231

Avoiding Infinite Recursion. . . . . . . . . 232

HOUR 11: Using Constants, Data Types, Variables, and Arrays 237

Understanding Data Types . . . . . . . . . 238

Defining and Using Constants. . . . . . . . 242

Declaring and Referencing Variables . . . . . . . 244

Working with Arrays . . . . . . . . . . 250

Determining Scope . . . . . . . . . . 254

Declaring Variables of Static Scope. . . . . . . 258

Naming Conventions. . . . . . . . . . 259

Using Variables in Your Picture Viewer Project . . . . . 261

HOUR 12: Performing Arithmetic, String Manipulation, and Date/Time Adjustments 269

Performing Basic Arithmetic Operations with Visual Basic . . . 270

Comparing Equalities . . . . . . . . . 274

Understanding Boolean Logic . . . . . . . . 274

Manipulating Strings . . . . . . . . . . 278

Working with Dates and Times . . . . . . . . 283

HOUR 13: Making Decisions in Visual Basic Code 293

Making Decisions Using If...Then . . . . . . . 293

Branching Within a Procedure Using GoTo . . . . . . 304

HOUR 14: Looping for Efficiency 309

Looping a Specific Number of Times Using For...Next . . . . 309

Using Do...Loop to Loop an Indeterminate Number of Times . . . 315

HOUR 15: Debugging Your Code 323

Adding Comments to Your Code . . . . . . . . 324

Identifying the Two Basic Types of Errors. . . . . . 326

Using Visual Basic’s Debugging Tools . . . . . . . 328

Writing an Error Handler Using Try...Catch...Finally . . . 336

HOUR 16: Designing Objects Using Classes 347

Understanding Classes . . . . . . . . . 348

Instantiating Objects from Classes . . . . . . . 357

HOUR 17: Interacting with Users 367

Displaying Messages Using the MessageBox.Show() Function . . . 367

Creating Custom Dialog Boxes . . . . . . . . 373

Using InputBox() to Get Information from a User . . . . . 377

Interacting with the Keyboard . . . . . . . . 379

Using the Common Mouse Events . . . . . . . 382

HOUR 18: Working with Graphics 389

Understanding the Graphics Object. . . . . . . 389

Working with Pens . . . . . . . . . . 392

Using System Colors . . . . . . . . . . 393

Working with Rectangles . . . . . . . . . 396

Drawing Shapes . . . . . . . . . . 397

Drawing Text . . . . . . . . . . . 399

Persisting Graphics on a Form. . . . . . . . 400

Building a Graphics Project Example . . . . . . . 400

PART IV: Working with Data

HOUR 19: Performing File Operations 409

Using the OpenFileDialog and SaveFileDialog Controls . . . 409

Manipulating Files with the File Object. . . . . . 415

Manipulating Directories with the Directory Object . . . . 424

HOUR 20: Working with the Registry and Text Files 427

Working with the Registry . . . . . . . . . 427

Reading and Writing Text Files . . . . . . . . 439

HOUR 21: Working with a Database 451

Introducing ADO.NET . . . . . . . . . 452

Manipulating Data . . . . . . . . . . 456

HOUR 22: Controlling Other Applications Using Automation 469

Automating Microsoft Excel . . . . . . . . 470

Automating Microsoft Word . . . . . . . . 476

PART V: Deploying Solutions and Beyond

HOUR 23: Deploying Applications 481

Understanding ClickOnce Technology. . . . . . . 481

Using the Publish Wizard to Create a ClickOnce Application . . . 482

Testing Your Picture Viewer ClickOnce Install Program . . . . 486

Uninstalling an Application You’ve Distributed . . . . . 486

Setting Advanced Options for Creating ClickOnce Programs . . . 488

HOUR 24: The 10,000-Foot View 491

The .NET Framework . . . . . . . . . . 491

Common Language Runtime . . . . . . . . 492

Microsoft Intermediate Language . . . . . . . 493

Namespaces . . . . . . . . . . . 494

Common Type System . . . . . . . . . 496

Garbage Collection . . . . . . . . . . 496

Further Reading . . . . . . . . . . 497

9780672336294, 9/17/2012

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)