CHF22.90
Download steht sofort bereit
In just 24 sessions of one hour or less, you'll learn how to build complete, reliable, and modern Windows applications with Microsoft® Visual Basic® 2015. Using a straightforward, step-by-step approach, each lesson builds on what you've already learned, giving you a strong foundation for success with every aspect of VB 2015 development.
Notes present interesting pieces of information.
Tips offer advice or teach an easier way to do something.
Cautions advise you about potential problems and help you steer clear of disaster.
Learn How To
Download all examples and source code presented in this book from informit.com/title/9780672337451 as they become available.
Who Should Read This Book
Those who have little or no programming experience or who might be picking up Visual Basic as a second language.
Bug Alert
Description: Changing the startup form's name in a VB WinForms app does not update the "Startup form" #4517
Explanation: In the latest Visual Basic update on GitHub, Microsoft accidentally introduced a significant bug that you should be aware of. In the Visual Basic project properties dialog on one of the tabs (Application), is a drop down box for selecting the "startup object". This can be either a Main method or a System.Windows.Forms instance (or System.Windows.Window for WPF). When you do a rename on a form (say from the code editor in source or from the solution explorer) currently set as the startup form the rename doesn't cascade to the startup object project property cause the project to enter an invalid state where the user must now manually reset this project property from the now nonexistent Form to the new name. This is a huge annoyance. The fix for the bug (until Microsoft addresses) can be found here: http://www.jamesfoxall.com/teach-visual-basic-2015-errata/
Autorentext
James Foxall is President & CEO of Tigerpaw Software, a commercial software company providing complete business automation to more than 40,000 users in 28 countries in the IT/Networking, Telecommunications, Systems Integrator, Security, and Point of Sale industries. In his current role as President and CEO, James provides the vision and management to keep Tigerpaw focused on its customers and properly serving its markets.
James has a Masters degree in Business Administration and a BS degree in Management of Information Systems. Devoted to creating better businesses through technology, James has written 15 books, which have been published in over a dozen languages around the world. He is considered an authority on business process improvement and application interface and behavior standards of Windows applications, and serves the business community as an international speaker on automating business processes in the SMB environment.
Inhalt
Introduction . . . . . . . . . . . . . xvii
Part I: The Visual Basic 2015 Environment
Hour 1: Jumping in with Both Feet: A Visual Basic 2015 Programming Tour . 1
Starting Visual Basic 2015 . . . . . . . . . . 2
Creating a New Project . . . . . . . . . . 3
Understanding the Visual Studio 2015 Environment . . . . . 6
Changing the Characteristics of Objects . . . . . . . 7
Adding Controls to a Form. . . . . . . . . 13
Designing an Interface . . . . . . . . . . 15
Writing the Code Behind an Interface. . . . . . . 20
Running a Project . . . . . . . . . . . 24
Summary . . . . . . . . . . . . 27
Q&A . . . . . . . . . . . . . 28
Workshop. . . . . . . . . . . . 28
Exercises. . . . . . . . . . . . . 29
Hour 2: Navigating Visual Basic 2015 . . . . . . . . 31
Using the Visual Basic 2015 Start Page . . . . . . . 31
Navigating and Customizing the Visual Basic Environment . . . 34
Working with Toolbars . . . . . . . . . . 40
Adding Controls to a Form Using the Toolbox . . . . . . 41
Setting Object Properties Using the Properties Window . . . . 43
Managing Projects . . . . . . . . . . . 50
A Quick-and-Dirty Programming Primer. . . . . . . 57
Getting Help. . . . . . . . . . . . 59
Summary . . . . . . . . . . . . 60
Q&A . . . . . . . . . . . . . 60
Workshop. . . . . . . . . . . . 61
Exercises. . . . . . . . . . . . . 61
Hour 3: Understanding Objects and Collections . . . . . . 63
Understanding Objects . . . . . . . . . . 64
Understanding Properties. . . . . . . . . . 64
Understanding Methods. . . . . . . . . . 72
Building a Simple Object Example Project . . . . . . . 73
Understanding Collections . . . . . . . . . 79
Using the Object Browser . . . . . . . . . . 82
Summary . . . . . . . . . . . . 84
Q&A . . . . . . . . . . . . . 84
Workshop. . . . . . . . . . . . 85
Exercises. . . . . . . . . . . . . 85
Hour 4: Understanding Events . . . . . . . . . . 87
Understanding Event-Driven Programming . . . . . . 87
Building an Event Example Project . . . . . . . . 97
Keeping Event Names Current . . . . . . . . 103
Summary . . . . . . . . . . . . 103
Q&A . . . . . . . . . . . . . 104
Workshop. . . . . . . . . . . . 104
Exercises. . . . . . . . . . . . 105
Part II: Building a User Interface
Hour 5: Building Forms: The Basics . . . . . . . . 107
Changing a Form's Name . . . . . . . . . 108
Changing a Form's Appearance . . . . . . . . 109
Showing and Hiding Forms . . . . . . . . . 122
Summary . . . . . . . . . . . . 128
Q&A . . . . . . . . . . . . . 128
Workshop. . . . . . . . . . . . 129
Exercises. . . . . . . . . . . . 130
Hour 6: Building Forms: Advanced Techniques . . . . . . 131
Working with Controls . . . . . . . . . . 131
Creating Topmost Nonmodal Windows. . . . . . . 151
Creating Transparent Forms . . . . . . . . . 151
Creating Scrollable Forms . . . . . . . . . 152
Creating MDI Forms . . . . . . . . . . 154
Setting the Startup Form . . . . . . . . . 158
Summary . . . . . . . . . . . . 159
Q&A . . . . . . . . . . . . . 160
Workshop. . . . . . . . . . . . 160
Exercises. . . . . . . . . . . . 161
Hour 7: Working with Traditional Controls . . . . . . . 163
Displaying Static Text with the Label Control. . . . . . 163
Allowing Users to Enter Text Using a Text Box. . . . . . 164
Creating Buttons. . . . . . . . . . . 172
Creating Containers and Groups of Option Buttons . . . . . 176
Displaying a List with the List Box . . . . . . . . 180
Creating Drop-Down Lists Using the Combo Box . . . . . 188
Summary . . . . . . . . . . . . 190
Q&A . . . . . . . . . . . . . 191
Workshop. . . . . . . . . . . . 191
Exercises. . . . . . . . . . . . 192
Hour 8: Using Advanced Controls. . . . . . . . . 193
Creating Timers . . . . . . . . . . . 193
Creating Tabbed Dialog Boxes . . . . . . . . 197
Storing Pictures in an Image List Control . . . . . . 200
Building Enhanced Lists Using the List View Control . . . . 202
Creating Hierarchical Lists Using the Tree View Control . . . . 207
Summary . . . . . . . . . . . . 211
Q&A . . . . . . . . . . . . . 212
Workshop. . . . . . . . . . . . 212
…