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

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

(Autor)

Buch | Softcover
528 Seiten
2012
Sams Publishing (Verlag)
978-0-672-33629-4 (ISBN)
32,95 inkl. MwSt
zur Neuauflage
  • Titel erscheint in neuer Auflage
  • Artikel merken
Zu diesem Artikel existiert eine Nachauflage
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

 

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.

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

 

Verlagsort Indianapolis
Sprache englisch
Maße 181 x 231 mm
Gewicht 794 g
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Software Entwicklung Objektorientierung
ISBN-10 0-672-33629-4 / 0672336294
ISBN-13 978-0-672-33629-4 / 9780672336294
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
objektorientierte Entwicklung modularer Maschinen für die digitale …

von Thomas Schmertosch; Markus Krabbes; Christian Zinke-Wehlmann

Buch | Hardcover (2024)
Hanser (Verlag)
44,99
Entwicklung von GUIs für verschiedene Betriebssysteme

von Achim Lingott

Buch (2023)
Hanser, Carl (Verlag)
39,99
Principles and Practice Using C++

von Bjarne Stroustrup

Buch | Softcover (2024)
Addison Wesley (Verlag)
85,95