Skip to main content

Visual Basic 2008 Programmer's Reference

Visual Basic 2008 Programmer's Reference

Rod Stephens

ISBN: 978-0-470-28179-6

Feb 2008

1225 pages

Select type: E-Book

Product not available for purchase

Description

Providing programmers and developers of all skill levels with a comprehensive tutorial and reference to Visual Basic (VB) 2008, Microsoft MVP Rod Stephens presents a broad, solid understanding of essential topics on the latest version of VB. He explains the forms, controls, and other objects that VB furnishes for building applications in a modern windows environment. Plus, he examines the powerful development environment that makes VB such a productive language, and he delves into the VB language itself to show you how to use it to perform an array of important development tasks.

Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.

Acknowledgments vi

Introduction xxvii

Part I: IDE 1

Chapter 1: Introduction to the IDE 3

Chapter 2: Menus, Toolbars, and Windows 15

Chapter 3: Customization 43

Chapter 4: Windows Form Designer 49

Chapter 5: WPF Designer 61

Chapter 6: Visual Basic Code Editor 71

Chapter 7: Debugging 87

Part II: Getting Started 101

Chapter 8: Selecting Windows Forms Controls 103

Chapter 9: Using Windows Forms Controls 121

Chapter 10: Windows Forms 149

Chapter 11: Selecting WPF Controls 175

Chapter 12: Using WPF Controls 187

Chapter 13: WPF Windows 223

Chapter 14: Program and Module Structure 237

Chapter 15: Data Types, Variables, and Constants 261

Chapter 16: Operators 307

Chapter 17: Subroutines and Functions 327

Chapter 18: Program Control Statements 353

Chapter 19: Error Handling 377

Chapter 20: Database Controls and Objects 401

Chapter 21: LINQ 457

Chapter 22: Custom Controls 493

Chapter 23: Drag and Drop, and the Clipboard 519

Chapter 24: UAC Security 537

Part III: Object-Oriented Programming 545

Chapter 25: OOP Concepts 547

Chapter 26: Classes and Structures 563

Chapter 27: Namespaces 605

Chapter 28: Collection Classes 619

Chapter 29: Generics 647

Part IV: Graphics 659

Chapter 30: Drawing Basics 661

Chapter 31: Brushes, Pens, and Paths 697

Chapter 32: Text 727

Chapter 33: Image Processing 745

Chapter 34: Printing 761

Chapter 35: Reporting 781

Part V: Interacting with the Environment 803

Chapter 36: Configuration and Resources 805

Chapter 37: Streams 837

Chapter 38: File-System Objects 849

Chapter 39: Windows Communication Foundation 873

Chapter 40: Useful Namespaces 885

Part VI: Appendices 909

Appendix A: Useful Control Properties, Methods, and Events 911

Appendix B: Variable Declarations and Data Types 923

Appendix C: Operators 931

Appendix D: Subroutine and Function Declarations 939

Appendix E: Control Statements 943

Appendix F: Error Handling 949

Appendix G: Windows Forms Controls and Components 951

Appendix H: WPF Controls 1035

Appendix I: Visual Basic Power Packs 1043

Appendix J: Form Objects 1047

Appendix K: Classes and Structures 1063

Appendix L: LINQ 1067

Appendix M: Generics 1077

Appendix N: Graphics 1081

Appendix O: Useful Exception Classes 1095

Appendix P: Date and Time Format Specifiers 1099

Appendix Q: Other Format Specifiers 1103

Appendix R: The Application Class 1109

Appendix S: The My Namespace 1113

Appendix T: Streams 1131

Appendix U: File-System Classes 1139

Appendix V: Index of Examples 1157

Index 1177

Appendix A code
Code Downloads
Appendix A code
Download
Code Downloads
Download
Appendix G code
Download
Appendix K code
Download
Appendix M code
Download
Chapter 2 code
Download
Chapter 6 code
Download
Chapter 7 code
Download
Chapter 8 code
Download
Chapter 9 code
Download
Chapter 10 code
Download
Chapter 11 code
Download
Chapter 12 code
Download
Chapter 13 code
Download
Chapter 14 code
Download
Chapter 15 code
Download
Chapter 16 code
Download
Chapter 17 code
Download
Chapter 18 code
Download
Chapter 19 code
Download
Chapter 20 code
Download
Chapter 21 code
Download
Chapter 22 code
Download
Chapter 23 code
Download
Chapter 24 code
Download
Chapter 26 code
Download
Chapter 27 code
Download
Chapter 28 code
Download
Chapter 29 code
Download
Chapter 30 code
Download
Chapter 31 code
Download
Chapter 32 code
Download
Chapter 33 code
Download
Chapter 34 code
Download
Chapter 35 code
Download
Chapter 36 code
Download
Chapter 37 code
Download
Chapter 38 code
Download
Chapter 39 code
Download
Chapter 40 code
Download
Alll sample code from book
Download
ChapterPageDetailsDatePrint Run
26Error in Code
Option Explicit On
Option Explicit Off

The code must be :
Option Explicit On
Option Infer Off
08/09/08

394Error in Code
grey code area contains:
DivideError1:
On Error GoTo -1
On Error Resume Next
i = 1 / j
Exit Sub

but to work as described in text, this should be:
DivideError1:
On Error GoTo -1
On Error Resume Next
i = 1 / j

There should be no Exit sub.
3/9/11

912Error in Reference
The DisplayRectangle entry incorrectly refers to Label3 in Figure A-1, but there is no Label3 in that figure. Please ignore that sentence.
3/9/11

Appendix E945Error in Syntax
incorrect syntax for iif and if
True and false parts and in the wrong order.

The syntax should be:
Public Function IIf( _
ByVal Expression As Boolean, _
ByVal TruePart As Object, _
ByVal FalsePart As Object _
) As Object
04/01/08