Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Start Here!™ Learn Microsoft Visual Basic® 2012
Dedication
A Note Regarding Supplemental Files
Introduction
Who Should Read This Book
Assumptions
Who Should Not Read This Book
Organization of This Book
Free eBook Reference
Conventions and Features in This Book
System Requirements
Code Samples
Installing the Code Samples
Using the Code Samples
Acknowledgments
Errata & Book Support
We Want to Hear from You
Stay in Touch
1. Getting to Know Visual Basic 2012
Development Opportunities for Visual Basic Programmers
New Development Platforms
Obtaining, Installing, and Starting Visual Studio Express 2012 for Windows 8
Downloading the Product
Installing Visual Studio Express 2012 for Windows 8
Starting Visual Studio Express 2012
Start Visual Studio Express 2012
The Visual Studio Development Environment
Open a Visual Basic project
Open a Visual Basic project
The Visual Studio Tools
The Designer Window
Display the Designer window
Running a Visual Basic Program
Run the World Capitals program
The Properties Window
Change properties
Change properties
Moving and Resizing the Programming Tools
Moving and Resizing Tool Windows
Move and resize the Properties window
Docking Tool Windows
Dock the Properties window
Hiding Tool Windows
Use the Auto Hide feature
Switching Among Open Files and Tools Using the IDE Navigator
Use the IDE Navigator
Use the IDE Navigator
Opening a Web Browser Within Visual Studio
Open the Visual Studio web browser
Open the Visual Studio web browser
Customizing IDE Settings to Match This Book’s Exercises
Checking Project and Compiler Settings
Check project and compiler settings
Exiting Visual Studio
Exit Visual Studio
Exit Visual Studio
Summary
2. Creating Your First Windows 8 Application
Web List: Your First Visual Basic Program
Creating the User Interface
Create a new project
Create a new project
Create a user interface
Move and resize a text box
Add a button object
Add a second text box
Add a web view object
Setting the Properties
Set the web address text box
Set the web address text box
Set the Content property of the button object
Set the properties of the web view object
Writing the Visual Basic Code
Use the Code Editor to create an event handler
Use the Code Editor to create an event handler
A Look at the Visual Basic Code-Behind File
Running Visual Basic Applications
Run the My Web List program
Run the My Web List program
Sample Projects on Disk
Building an Executable File and Deploying
Deploy a release build for a Windows 8 application
Deploy a release build for a Windows 8 application
Summary
3. Using Controls
Using the Ellipse and TextBlock Controls
Create a colorful background shape with the Ellipse control
Create a colorful background shape with the Ellipse control
Add a TextBlock control to display text on the page
Using the CheckBox and RadioButton Controls
Add a check box to the page
Add a check box to the page
Add radio buttons to a page
Using the MediaElement Control to Add Music and Video
Thinking about Media Files
Play audio media with the MediaElement control
Use Button controls to manage playback
Play video media with the MediaElement control
Summary
4. Designing Windows 8 Applications with Blend for Visual Studio
Blend for Visual Studio
Why Blend Is Useful for Visual Studio Developers
Starting Blend
Open a new project in Blend
Design Tools in the Blend IDE
Using XAML Controls in Blend
Add an Image control to the page
Add an Image control to the page
Add a Button control to the page
Creating a Storyboard to Add Basic Animation Effects
Create a storyboard
Create a storyboard
Run and test a storyboard
Writing Event Handlers in Visual Studio
Adjust Blend settings for XAML projects
Adjust Blend settings for XAML projects
Open and run the event handler
Edit the event handler to reverse the animation
Using the OnNavigatedTo Event
Create a startup event handler for the main page
Summary
5. Working with XAML
Understanding XAML Basics
What Is XAML?
XAML Is Related to XML and HTML
XAML Elements
Namespaces in XAML Markup
Examining XAML Project Files
Open a new Windows 8 XAML project and examine App.xaml
Edit XAML markup in MainPage.xaml
Creating XAML Objects
Add ToggleButton and Image controls to the grid
Add ToggleButton and Image controls to the grid
Create an event handler for the toggle button object
Add a Canvas control and fill it with shapes
Summary
6. Visual Basic Language Elements
Understanding Visual Basic Program Statements
Using Variables to Store Information
Setting Aside Space for Variables: The Dim Statement
Using Variables in an Event Handler
Change the value of a variable
Change the value of a variable
Using a Variable to Store and Process Input
Process input using a TextBox control
Process input using a TextBox control
Working with Data Types
Use fundamental data types in code
Use fundamental data types in code
Constants: Variables That Don’t Change
Use a constant in a code-behind file
Use a constant in a code-behind file
Working with Visual Basic Operators
Basic Math: The +, –, *, and / Operators
Work with basic operators
Advanced Operators: \, Mod, ^, and &
Work with advanced operators
Establishing Order of Precedence
Using Parentheses in a Formula
Summary
7. Controlling Application Design, Layout, and Program Flow
Creating a Tile-Based Layout for Windows Store Apps
Designing Pages for User Input
Build a tile-based layout with XAML markup
Use Select Case to process ListBox selections
Evaluating Specific Conditions Using If…Then…Else Statements
Add an If…Then…Else statement
Add an If…Then…Else statement
Using the Day of the Week in an If…Then…Statement
Controlling Program Flow Using For…Next and For Each…Next Loops
For…Next Loops
Add a For…Next loop
For Each…Next Loops
Add a For Each…Next loop
Writing an Exception Handler to Manage Error Conditions
Add an exception handler
Add an exception handler
Summary
8. Using the .NET Framework
Programming Resourcefully: Using Class Libraries in the .NET Framework
Object-Oriented Terminology
Using the Object Browser
Use the Object Browser to explore Microsoft.VisualBasic
Using Methods in System.String
Process text with .NET Framework methods
Process text with .NET Framework methods
Search a string for a pattern
Using Methods in System.Math
Use the System.Math class to compute square roots
Use the System.Math class to compute square roots
Working with Random Numbers
Generate a random number
Using Code Snippets to Insert Ready-Made Code
Generate a set of random numbers with a Do…While loop
Generate a set of random numbers with a Do…While loop
Summary
9. Debugging Applications
Finding and Correcting Errors
Three Types of Errors
Identifying Logic Errors
Debugging 101: Using Debugging Mode
Debug the Debug Test program
Debug the Debug Test program
Tracking Variables by Using a Watch Window
Open a Watch window
Open a Watch window
Visualizers: Debugging Tools That Display Data
Open a text visualizer in the debugger
Open a text visualizer in the debugger
Using the Immediate Window
Use the Immediate window to modify a variable
Use the Immediate window to modify a variable
Removing Breakpoints
Remove a breakpoint
Remove a breakpoint
Summary
10. Managing Data with Arrays and LINQ
Using Arrays to Store Data
Declaring Arrays
Declaring a Fixed-Size Array
Using an Array
Assigning Initial Values to an Array
Create string arrays in a program
Using Methods in the Array Class
Use the Array.Sort and Array.Reverse methods
Use the Array.Sort and Array.Reverse methods
Introducing LINQ
Understanding LINQ Syntax
Create a LINQ query to extract data from one array
Create a LINQ query to find overlapping elements in two arrays
Working with XML Documents
Using XML Documents in a Visual Basic Project
Create a LINQ query that retrieves XML data from an XML document
Summary
11. Design Focus: Five Great Features for a Windows 8 Application
Creating a Tile for Your App on the Windows Start Page
Create a tile for the Start page
Create a tile for the Start page
Add a custom Start page tile to a Visual Studio project
Creating a Splash Screen for Your App
Create a splash screen to run at startup
Create a splash screen to run at startup
Settings Permissions and Capabilities for Your Windows 8 App
Set permissions and capabilities for your app
Set permissions and capabilities for your app
Using a Project Template to Showcase Application Content
Use the Grid App template to display product information
Use the Grid App template to display product information
Optimizing Your App for Touch Input and Gestures
Touch Input is Built In
The Tap
The Slide
Zooming and Resizing
Designing for Touch
Summary
12. Future Development Opportunities and the Windows Store
Preparing for the Windows Store
Exploring the Store’s Features
Pricing and Sales
Getting Ready for Certification and Deployment
Store Requirements Checklist
Future Opportunities and Programming Resources
Web Sites for Visual Basic and Windows 8
Video on the Web
Books About Visual Basic and Visual Studio
Visual Basic Programming
Windows Programming
Database Programming and LINQ
Web Programming with Visual Basic
General Books About Programming and Computer Science
Summary
Index
About the Author
Copyright
← Prev
Back
Next →
← Prev
Back
Next →