You are previewing Programming Microsoft® Visual Basic® 6.0.
O'Reilly logo
Programming Microsoft® Visual Basic® 6.0

Book Description

Create professional-quality applications, components, and user interfaces faster and more efficiently than ever with the powerful object-oriented programming capabilities in the Visual Basic 6.0 development system.

Table of Contents

  1. Programming Microsoft® Visual Basic® 6.0
    1. Foreword
    2. Acknowledgments
    3. Introduction
    4. I. The Basics
      1. 1. First Steps with Microsoft Visual Basic 6
        1. The Integrated Development Environment
          1. Running the IDE
          2. Selecting the Project Type
          3. IDE Windows
          4. Menus
          5. Toolbars
          6. The Toolbox
        2. Your Very First Visual Basic Program
          1. Adding Controls to a Form
          2. Setting Properties of Controls
          3. Naming Controls
          4. Moving and Resizing Controls
          5. Setting the Tab Order
          6. Adding Code
          7. Running and Debugging the Program
          8. Refining the Sample Program
          9. Ready, Compile, Run!
      2. 2. Introduction to Forms
        1. Common Properties
          1. The Left, Top, Width, and Height Properties
          2. The ForeColor and BackColor Properties
          3. The Font Property
          4. The Caption and Text Properties
          5. The Parent and Container Properties
          6. The Enabled and Visible Properties
          7. The hWnd Property
          8. The TabStop and TabIndex Properties
          9. The MousePointer and MouseIcon Properties
          10. The Tag Property
          11. Other Properties
        2. Common Methods
          1. The Move Method
          2. The Refresh Method
          3. The SetFocus Method
          4. The ZOrder Method
        3. Common Events
          1. The Click and DblClick Events
          2. The Change Event
          3. The GotFocus and LostFocus Events
          4. The KeyPress, KeyDown, and KeyUp Events
          5. The MouseDown, MouseUp, and MouseMove Events
        4. The Form Object
          1. Basic Form Properties
          2. Fine-Tuning the Performance of Forms
          3. A Form's Life Cycle
            1. The Initialize event
            2. The Load event
            3. The Resize event
            4. The Activate event
            5. The Paint event
            6. The Deactivate event
            7. The QueryUnload event
            8. The Unload event
          4. The Controls Collection
          5. The Screen Object
          6. Printing Text
          7. Graphic Methods
            1. Drawing points
            2. Drawing lines and rectangles
            3. Drawing circles, ellipses, and arcs
          8. The DrawMode Property
          9. The ScaleMode Property
          10. Palette Support
      3. 3. Intrinsic Controls
        1. TextBox Controls
          1. Run-Time Properties
          2. Trapping Keyboard Activity
          3. Validation Routines for Numbers
          4. The CausesValidation Property and the Validate Event
          5. Auto-Tabbing Fields
          6. Formatting Text
          7. Multiline TextBox Controls
        2. Label and Frame Controls
          1. Label Controls
          2. Frame Controls
        3. CommandButton, CheckBox, and OptionButton Controls
          1. CommandButton Controls
          2. CheckBox Controls
          3. OptionButton Controls
          4. Going Graphical
        4. ListBox and ComboBox Controls
          1. ListBox Controls
            1. Reacting to user actions
            2. The ItemData property
            3. Multiple-selection ListBox controls
          2. ComboBox Controls
        5. PictureBox and Image Controls
          1. The PictureBox Control
            1. Loading images
            2. The PaintPicture method
          2. The Image Control
        6. Scrollbar Controls
        7. DriveListBox, DirListBox, and FileListBox Controls
        8. Other Controls
          1. The Timer Control
          2. The Line Control
          3. The Shape Control
          4. The OLE Control
        9. Menus
          1. Accessing Menus at Run Time
          2. Pop-Up Menus
        10. Control Arrays
          1. Sharing Event Procedures
          2. Creating Controls at Run Time
          3. Iterating on the Items of a Control Array
          4. Arrays of Menu Items
      4. 4. Variables and Procedures
        1. Scope and Lifetime of Variables
          1. Global Variables
          2. Module-Level Variables
          3. Dynamic Local Variables
          4. Static Local Variables
        2. Overview of Native Data Types
          1. The Integer Data Type
          2. The Long Data Type
          3. The Boolean Data Type
          4. The Byte Data Type
          5. The Single Data Type
          6. The Double Data Type
          7. The String Data Type
          8. The Currency Data Type
          9. The Date Data Type
          10. The Object Data Type
          11. The Variant Data Type
          12. The Decimal Data Type
        3. Aggregate Data Types
          1. User-Defined Types
          2. Arrays
            1. Static and dynamic arrays
            2. Arrays within UDTs
            3. Arrays and variants
            4. Assigning and returning arrays
            5. Byte arrays
            6. Inserting and deleting items
            7. Sorting
            8. Arrays of arrays
          3. Collections
            1. Iterating on Collection objects
            2. Working with Collection objects
          4. Dictionary Objects
            1. Dictionary vs. Collection objects
        4. Procedures
          1. Scope
          2. Parameter Lists and Return Values
            1. Passing by value or by reference
            2. Passing user-defined types
            3. Passing Private types
            4. The Optional keyword
            5. Named arguments
            6. The ParamArray keyword
          3. Error Handling
            1. The On Error Goto <label> statement
            2. The On Error Resume Next statement
            3. Unhandled errors
            4. The Err object
            5. Error handling inside the Visual Basic IDE
      5. 5. The Visual Basic for Applications and Visual Basic Libraries
        1. Control Flow
          1. Branch Statements
          2. Loop Statements
          3. Other Functions
        2. Working with Numbers
          1. Math Operators
          2. Comparison Operators
          3. Boolean and Bit-Wise Operators
          4. Rounding and Truncating
          5. Converting Among Different Numeric Bases
          6. Format Options for Numbers
          7. Random Numbers
        3. Working with Strings
          1. Basic String Operators and Functions
          2. Conversion Functions
          3. Find and Replace Substrings
          4. Format Options for Strings
        4. Working with Dates and Times
          1. Getting and Setting the Current Date and Time
          2. Building and Extracting Date and Time Values
          3. Date Arithmetic
          4. Format Options for Date and Time Values
        5. Working with Files
          1. Handling Files
          2. Handling Directories
          3. Iterating Over All Files in a Directory
          4. Processing Text Files
          5. Processing Delimited Text Files
          6. Processing Binary Files
          7. The FileSystemObject Hierarchy
            1. The FileSystemObject root object
            2. The Drive object
            3. The Folder object
            4. The File object
            5. The TextStream object
        6. Interacting with Windows
          1. The App Object
          2. The Clipboard Object
            1. Copying and pasting text
            2. Copying and pasting images
            3. A generic Edit menu
          3. The Printer Object
            1. Retrieving information on installed printers
            2. Working with the current printer
            3. Outputting data to the Printer object
          4. Running Other Applications
          5. Showing Help
            1. Writing a help file
            2. Standard Windows help
            3. What's This help
      6. 6. Classes and Objects
        1. The Basic Concepts
          1. The Main Benefits of OOP
            1. Encapsulation
            2. Polymorphism
            3. Inheritance
          2. Your First Class Module
            1. Auto-instancing object variables
            2. Property procedures
            3. Methods
            4. The Class Initialize event
            5. Debugging a class module
            6. The Me keyword
        2. Properties, Methods, and Events
          1. Read-Only and Write-Only Properties
            1. Read-only properties
            2. Write-only properties
            3. Write-once/read-many properties
            4. Read-only properties vs. methods
            5. Properties with arguments
            6. Properties as Public variables in a class
          2. Advanced Uses of Methods
            1. Saving results for subsequent calls
            2. Simulating class constructors
          3. Advanced Uses of Properties
            1. Enumerated properties
            2. Properties that return objects
            3. Property Set procedures
            4. Variant properties
            5. Properties in BAS modules
          4. The CallByName Function
          5. Attributes
            1. Class module attributes
            2. The default member of a class
            3. A useful example
            4. Other attributes
        3. The Inner Life of Objects
          1. What an Object Variable Really Is
          2. Under the Objective Hood
            1. Object instantiation
            2. Object usage
            3. Object termination
            4. The binding mechanism
          3. Revisiting Object Keywords
            1. The New keyword
            2. The Set command
            3. The Nothing value
            4. The Is operator
            5. The TypeOf … Is statement
            6. The TypeName function
            7. ByVal and ByRef keywords
          4. The Class_Terminate Event
            1. Example 1: managing the mouse cursor
            2. Example 2: opening and closing files
            3. Example 3: creating a log of your procedures
      7. 7. Events, Polymorphism, and Inheritance
        1. Events
          1. Events and Code Reusability
          2. Syntax for Events
            1. Declaring an event
            2. Raising an event
            3. Declaring the object in the client module
            4. Trapping the event
          3. A First, Complete Sample Application
            1. The CFileOp class module
            2. The client form module
          4. Improving the Sample Application
            1. Filtering input data
            2. Prenotification events
            3. Notifying clients of error conditions
            4. Notifying clients of progress
          5. Multicasting
            1. A class for validating TextBox controls
            2. Improving the CTextBxN class
            3. Send custom events to the container
            4. Trapping events from multiple controls
            5. The pitfalls of multicasting
        2. Polymorphism
          1. Leveraging Polymorphism
            1. Polymorphic procedures
            2. Polymorphic classes
            3. Polymorphism and late binding
          2. Working with Interfaces
            1. Creating a secondary interface
            2. Implementing the interface
            3. Writing the actual code
            4. Accessing the secondary interface
            5. Refining the client code
            6. Playing with VBA keywords
            7. Support functions to retrieve secondary interfaces
        3. Inheritance
          1. Inheritance Through Delegation
            1. Basic delegation techniques
            2. Support for secondary interfaces
            3. Subclassing the base class
            4. Subclassing the VBA language
          2. Inheritance and Polymorphism
            1. Implementing the base class as an interface
            2. Add executable code to abstract classes
          3. The Benefits of Inheritance
        4. Object Hierarchies
          1. Relationships Among Objects
            1. One-to-one relationships
            2. One-to-many relationships
          2. Collection Classes
            1. Make Item the default member
            2. Add support for enumeration
            3. Testing the collection class
            4. Improving the collection class
            5. Add real constructors to the game
          3. Full-Fledged Hierarchies
            1. Class static data
            2. Backpointers
            3. Circular references
          4. The Class Builder Add-In
      8. 8. Databases
        1. The Data Access Saga
          1. ODBC
          2. DAO
          3. RDO
          4. ODBCDirect
          5. OLE DB
          6. ADO
        2. Visual Database Tools
          1. The DataView Window
            1. Adding a new data link
            2. Creating or editing a database table
          2. The Database Diagram Window
          3. The Query Builder Window
        3. ADO Data Binding
          1. The Binding Mechanism
          2. Working with Bound Controls
          3. The ADO Data Control
          4. Formatting Data
            1. The DataFormat property
            2. StdDataFormat objects
          5. The Data Form Wizard
        4. The Dataenvironment Designer
          1. Connection Objects
          2. Command Objects
            1. Creating a Command object
            2. Parameterized commands
          3. Data Binding with the DataEnvironment Designer
            1. Fields and grids
            2. Selecting field types
          4. Hierarchical Commands
            1. Relation hierarchies
            2. Grouping hierarchies
            3. Aggregate hierarchies
        5. Crash Course in SQL
          1. The SELECT Command
            1. Basic selections
            2. Sorting and grouping
            3. Subqueries
            4. Joins
            5. Unions
          2. The INSERT INTO Command
          3. The UPDATE Command
          4. The DELETE Command
    5. II. The User Interface
      1. 9. Advanced Forms and Dialogs
        1. Standard Usage of Forms
          1. Forms as Objects
            1. Hidden global form variables
            2. The "clean form instance" problem
            3. The Forms collection
          2. Reusable Forms
            1. Using custom properties and methods
            2. Adding custom events
            3. Parameterized forms
          3. Forms as Object Viewers
          4. Dynamic Control Creation
            1. The Add method of the Controls collection
            2. Adding an external ActiveX control
            3. The Windowless Controls Library
            4. Unreferenced controls
            5. Late-bound properties, methods, and events
          5. Data-Driven Forms
            1. Trapping events from an array of controls
            2. Database-driven data-entry forms
        2. MDI Forms
          1. MDI Applications
            1. MDI child forms
            2. The Window menu
            3. Adding properties to MDI child forms
          2. Polymorphic MDI Containers
            1. Defining the parent-child interface
            2. Changing the client form's implementation
          3. The Application Wizard
        3. Using Drag-and-Drop
          1. Automatic Drag-and-Drop
          2. Manual Drag-and-Drop
            1. Initiating a drag-and-drop operation
            2. Preparing to drop on the source control
            3. Dropping data
            4. Loading data on demand
            5. Dragging and dropping files
            6. Using custom formats
      2. 10. Windows Common Controls: Part I
        1. The ImageList Control
          1. Adding Images
            1. Adding images at design time
            2. Adding images at run time
          2. Extracting and Drawing Images
            1. Extracting individual images
            2. Creating transparent images
            3. Using the Draw method
            4. Creating composite images
        2. The TreeView Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Adding Node objects
            2. Appearance and visibility
            3. Showing information about a Node
            4. Editing Node text
            5. Using check boxes
          3. Advanced Techniques
            1. Loading Nodes on demand
            2. Searching the Nodes collection
            3. Implementing drag-and-drop
        3. The ListView Control
          1. Setting Design-Time Properties
            1. General properties
            2. Column headers
            3. Background image
          2. Run-Time Operations
            1. Adding ListItem objects
            2. Adding ColumnHeaders objects
            3. Adding ListSubItems
            4. Loading data from databases
            5. Sorting and reordering columns
            6. Searching items
            7. Other properties, methods, and events
        4. The Toolbar Control
          1. Setting Design-Time Properties
            1. The Toolbar Wizard
            2. General properties
            3. Button objects
          2. Run-Time Operations
            1. Creating Button and ButtonMenu objects
            2. Reacting to a user's actions
            3. Customizing the Toolbar control
        5. The TabStrip Control
          1. Setting Design-Time Properties
            1. General properties
            2. Tab objects
            3. Preparing the child containers
          2. Run-Time Operations
            1. Moving and resizing containers
            2. Selecting the current container
            3. Creating and removing Tab objects
        6. The StatusBar Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Creating and removing Panel objects
            2. Reacting to a user's actions
            3. Creating animated icons
            4. Toggling the state of lock keys
            5. Hosting controls on the status bar
        7. The ProgressBar Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
        8. The Slider Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Showing the value as a ToolTip
            2. Employing the SelectRange mode
        9. The ImageCombo Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
      3. 11. Windows Common Controls: Part II
        1. The Animation Control
        2. The UpDown Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
        3. The FlatScrollBar Control
        4. The MonthView Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Retrieving the current Date value
            2. Reacting to range selections
            3. Finding the optimal size
            4. Highlighting dates
            5. Implementing drag-and-drop
        5. The DateTimePicker Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Managing callback fields
        6. The CoolBar Control
          1. Setting Design-Time Properties
            1. General properties
            2. Band objects
            3. Image and color management
          2. Run-Time Operations
            1. Reacting to Resize events
            2. Adding Band objects
            3. Using a Toolbar control as a child control
      4. 12. Other ActiveX Controls
        1. The MaskEdBox Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Working with the Text property
            2. Validating user input
        2. The CommonDialog Control
          1. The Color Dialog
          2. The Font Dialog
          3. The Printer Dialog
          4. The FileOpen and FileSave Dialogs
            1. Properties in common
            2. The FileSave dialog
            3. The single-selection FileOpen dialog
            4. The multiple-selection FileOpen dialog
          5. Help Windows
        3. The RichTextBox Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Loading and saving files
            2. Changing character attributes
            3. Changing paragraph attributes
            4. Managing the Tab key
            5. Searching and replacing text
            6. Moving the caret and selecting text
            7. Printing the current document
            8. Embedding objects
        4. The SSTab Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Changing a tab's attributes
            2. Creating new tabs
            3. Reacting to tab selection
            4. Managing the input focus
        5. The SysInfo Control
          1. Properties
          2. Events
        6. The MSChart Control
          1. Setting Design-Time Properties
          2. Run-Time Operations
    6. III. Database Programming
      1. 13. The ADO Object Model
        1. The Connection Object
          1. Properties
            1. Preparing for the connection
            2. Managing transactions
            3. Testing the state and the version
          2. Methods
            1. Establishing the connection
            2. Executing database commands and queries
            3. Starting and committing transactions
            4. Determining the structure of database tables
          3. Events
            1. Connection events
            2. Execution events
            3. Transaction events
            4. Other events
          4. The Errors Collection
        2. The Recordset Object
          1. Properties
            1. Setting the Recordset's source
            2. Working with cursors
            3. Working with concurrency
            4. Reading and modifying fields' values
            5. Setting and retrieving the position in the Recordset
            6. Sorting and filtering records
            7. Other properties
          2. Methods
            1. Opening and closing the Recordset
            2. Refreshing the Recordset
            3. Retrieving data
            4. Navigating the Recordset
            5. Updating, inserting, and deleting records
            6. Finding records
            7. Updating records in batch mode
            8. Implementing persistent Recordsets
            9. Managing multiple Recordsets
            10. Testing for features
          3. Events
            1. Data retrieval events
            2. Navigation events
            3. Update events
        3. The Field Object
          1. Properties
            1. Describing the field's characteristics
            2. Describing the field's value
          2. Methods
          3. The Fields Collection
        4. The Command Object
          1. Properties
            1. Setting the query
            2. Optimizing the execution
          2. Methods
        5. The Parameter Object
          1. Properties
          2. Methods
          3. The Parameters Collection
        6. The Property Object
        7. ADO 2.1 DDL and Security Extensions
          1. The Catalog Object
          2. The Table Object
          3. The Column Object
          4. The Index Object
          5. The Key Object
          6. The View and Procedure Objects
          7. The Group and User Objects
      2. 14. ADO at Work
        1. Setting Up a Connection
          1. Building the Connection String
          2. Opening the Connection
            1. Explicit Connection objects
            2. Implicit Connection objects
            3. The Properties collection
          3. Asynchronous Connections
        2. Processing Data
          1. Opening a Recordset Object
            1. The source string
            2. Cursors and concurrency
            3. Stand-alone Recordset objects
          2. Basic Operations on a Database
            1. Read records
            2. Insert, delete, and update records
            3. Locking issues
            4. Updates through SQL commands
          3. Optimistic Client-Batch Updates
            1. Disconnecting the Recordset
            2. Resolving the conflicts
            3. The Update Criteria property
          4. Using Command Objects
            1. Action commands
            2. Row-returning queries
            3. Parameterized commands and queries
          5. Using the DataEnvironment Designer
            1. Connections and commands
            2. Recordsets
            3. Parameterized queries
            4. Reusable modules
            5. The dark side of the DataEnvironment object
        3. Advanced Techniques
          1. Recordset Events
            1. Field validation
            2. Record validation
            3. Displaying data with unbound controls
            4. Dealing with multiple events
          2. Asynchronous Operations
            1. Asynchronous commands
            2. Asynchronous fetches
          3. Stored Procedures
            1. The SQL Editor and the T-SQL Debugger
            2. Parameterized stored procedures
            3. Multiple result sets
          4. Hierarchical Recordsets
            1. The MSDataShape provider
            2. The SHAPE APPEND command
            3. The SHAPE COMPUTE command
            4. Using hierarchical Recordset objects
            5. Parameterized commands
            6. DataEnvironment Commands objects
      3. 15. Tables and Reports
        1. The DataCombo and DataList Controls
          1. Setting Design-Time Properties
          2. Run-Time Operations
            1. Displaying additional lookup information
            2. Saving connections
            3. Updating the lookup table
        2. The DataGrid Control
          1. Setting Design-Time Properties
            1. Editing the Column layout
            2. The General and Keyboard tabs
            3. The Columns and Format tabs
            4. The Splits tab
            5. The Layout tab
          2. Run-Time Operations
            1. Working with the current cell
            2. Accessing other cells
            3. Managing cell selections
            4. Monitoring edit operations
            5. Performing insert and delete operations
            6. Trapping mouse events
            7. Changing the grid layout
            8. Dealing with lookup values
            9. Sorting data
        3. The Hierarchical FlexGrid Control
          1. Setting Design-Time Properties
            1. The General tab
            2. The Bands tab
            3. The other tabs
          2. Run-Time Operations
            1. Working with the current cell
            2. Accessing other cells
            3. Changing column attributes
            4. Making the grid editable
        4. The DataReport Designer
          1. Design-Time Operations
            1. Binding to a Command object
            2. Setting control properties
            3. Adding controls
            4. Displaying calculated fields
            5. Managing page footers and page breaks
            6. Other report properties
          2. Run-Time Operations
            1. Printing the report
            2. Taking advantage of asynchronous processing
            3. Exporting a report
            4. Creating custom export formats
            5. Changing the report layout at run time
            6. Adding dynamic formatting and lookup fields
    7. IV. ActiveX Programming
      1. 16. ActiveX Components
        1. Introducing COM
          1. A Long Story Made Short
          2. Types of COM Components
            1. In-process servers (DLL)
            2. Local out-of-process servers (EXE)
            3. Remote out-of-process servers (EXE)
            4. Using existing components
        2. Creating an ActiveX EXE Server
          1. The Basic Steps
            1. Setting the project properties
            2. Setting class properties
            3. Running the server project
            4. Creating the client application
            5. Testing the client
          2. The Instancing Property
            1. Selecting the most appropriate setting
            2. Private and Public objects
            3. MultiUse and SingleUse objects
            4. Internal instancing
            5. Global objects
          3. Passing Data Between Applications
            1. Marshaling
            2. Simple data types
            3. Private and Public objects
            4. Type libraries
            5. Performance tips
          4. Error Handling
            1. Error handling in the server component
            2. Error handling in the client application
            3. Component Busy and Component Request Pending
          5. Components with User Interfaces
            1. Determining the StartMode
            2. Showing forms
            3. Limiting the user's actions
          6. Compatibility Issues
            1. The role of the Registry
            2. Compatible components
            3. Version compatibility in the Visual Basic environment
            4. Design tips
          7. Registering a Component
          8. Shutting Down the Server
          9. Persistence
            1. Saving and restoring state
            2. The PropertyBag object
            3. Persistent object hierarchies
            4. Using the PropertyBag with any class module
            5. Persistent ADO Recordsets
        3. Creating an ActiveX DLL Server
          1. In-Process Components in the Visual Basic IDE
          2. Differences Between In-Process and Out-of-Process Components
            1. Error handling
            2. User interface
            3. Shutting down the server
            4. Reentrancy issues
            5. Differences between ActiveX DLL and standard EXE programs
          3. Embedding Forms in a DLL
          4. Performance
            1. Passing data
            2. Setting the DLL Base Address
          5. Extending an Application with Satellite DLLs
            1. Resource files
            2. Satellite DLLs
            3. Locale-aware client applications
        4. Multithreaded ActiveX Components
          1. Threading Models
          2. Multithreaded ActiveX EXE Components
            1. Thread pools
            2. The multithreading advantage
            3. User-interface issues
            4. Unattended execution
          3. Multithreaded ActiveX DLL Components
          4. Multithreaded Visual Basic Applications
            1. Determining the main thread
            2. Implementing multithreading
            3. Testing a multithreaded application
        5. Remote ActiveX Components
          1. Creating and Testing a Remote Component
            1. Compiling for remote activation
            2. Configuring the server
            3. Testing the client
            4. The CreateObject function
            5. Deploying the component
          2. Configuring DCOM
            1. Default authentication and impersonation levels
            2. Default access and launch permissions
            3. Identity settings
          3. Implementing a Callback Technique
            1. Early-bound and late-bound callbacks
            2. An example
            3. Comparing callbacks and events
      2. 17. ActiveX Controls
        1. ActiveX Control Fundamentals
          1. Creating the UserControl Module
          2. Running the ActiveX Control Interface Wizard
          3. Adding the Missing Pieces
            1. Delegated properties, methods, and events
            2. Custom properties
            3. Custom methods
            4. Custom events
            5. Properties that map to multiple controls
            6. Persistent properties
            7. The UserControl's Resize event
        2. The Usercontrol Object
          1. The Life Cycle of a UserControl Object
            1. Creation
            2. Termination
            3. Other event sequences
          2. The Extender Object
            1. Reading Extender properties
            2. Setting Extender properties
            3. The Object property
          3. The AmbientProperties Object
            1. Conforming to the parent form settings
            2. The UserMode property
            3. The AmbientChanged event
            4. Localizing ActiveX controls
            5. Other ambient properties
          4. Implementing Features
            1. Managing the input focus
            2. Invisible controls
            3. Hot keys
            4. Accessing the parent's controls
            5. Converting scale units
            6. Other properties
        3. Refining the ActiveX Control
          1. Custom Properties
            1. Design-time and run-time properties
            2. Enumerated properties
            3. Picture and Font properties
            4. Object properties
            5. Properties that return UDTs
            6. Special OLE data types
            7. Procedure IDs
            8. The Procedure Attributes dialog box
            9. Limitations and workarounds
          2. Container Controls
          3. Transparent Controls
            1. Using Label and Shape controls
            2. Using the MaskPicture and MaskColor properties
            3. Lightweight Controls
            4. The HasDC and Windowless properties
            5. Transparent windowless controls
          4. Data Binding
            1. PropertyChanged and CanPropertyChange methods
            2. The DataBindings collection
            3. The DataRepeater control
            4. What's missing
          5. Property Pages
            1. Running the Property Page Wizard
            2. The PropertyPage object
            3. Working with multiple selections
            4. Advanced techniques
          6. The Tricks of the Masters
            1. Callback methods
            2. Faster calls with VTable binding
            3. Secondary interfaces
            4. Trapping events with multicasting
        4. ActiveX Controls for the Internet
          1. Programming Issues
            1. ActiveX controls on HTML pages
            2. Hyperlinking
            3. Asynchronous download
            4. Accessing the browser
            5. Show and Hide events
            6. Multithreaded ActiveX controls
          2. Component Download
            1. Creating a package for deployment
            2. Safety
            3. Digital signatures
          3. Licensing
            1. The Require License Key option
            2. License keys for controls on Web pages
      3. 18. ADO Components
        1. Data Source Classes
          1. The GetDataMember Event
          2. Support for the DataMember Property
          3. Custom ActiveX Data Controls
        2. Data Consumer Classes
          1. Simple Data Consumers
            1. The BindingCollection object
            2. Data consumer classes and components
          2. Complex Data Consumers
        3. OLE DB Simple Providers
          1. The Structure of an OLE DB Simple Provider
          2. The OLE DB Simple Provider Class
          3. The Data Source Class
          4. The Registration Step
          5. Testing the OLE DB Simple Provider
        4. The Data Object Wizard
          1. Preparing for the Wizard
          2. Creating the Data-Bound Class
          3. Creating the Data-Bound UserControl
    8. V. Internet Programming
      1. 19. Dynamic HTML Applications
        1. A Quick Course on HTML
          1. Headings and Paragraphs
          2. Attributes
          3. Images
          4. Hyperlinks
          5. Tables
          6. Styles
          7. Forms
          8. Scripting
            1. VBScript vs. Visual Basic for Applications
            2. Executing code at page load
            3. Accessing form controls
            4. Generating HTML code
        2. An Introduction to Dynamic HTML
          1. Main Features
          2. Tags
          3. Properties
          4. Properties and Scripting
          5. Text Properties and Methods
          6. Events
            1. Event bubbling
            2. Canceling the default effect
            3. Timer events
            4. Event summary
        3. The DHTML Object Model
          1. The Window Object
            1. Properties
            2. Methods
            3. The History object
            4. The Navigator object
            5. The Location object
            6. The Screen object
            7. The Event object
          2. The Document Object
            1. Properties
            2. Methods
            3. Child collections
            4. The Selection object
          3. The TextRange Object
            1. Properties
            2. Methods
          4. The Table Object
        4. The DHTMLPage Designer
          1. A First Look at the DHTMLPage Designer
          2. Programming DHTML Elements
            1. The DHTMLPage object
            2. The id property
            3. The first example: A dynamic menu
            4. Using DIV and SPAN tags
            5. DHTML event procedures
            6. The MSHTML library
          3. DHTML Applications
            1. Navigating to other pages
            2. Loading a page asynchronously
            3. Managing the state
            4. Creating elements
            5. Testing DHTML applications
            6. Deploying a DHTML application
            7. Troubleshooting
        5. Remote Data Services
          1. DHTML Data Binding
            1. Creating the RDS.DataControl object
            2. Binding DHTML elements
            3. Navigating and updating the Recordset
            4. Tabular binding
            5. More on the RDS.DataControl object
          2. Using RDS Objects
            1. Establishing a connection
            2. Displaying and updating data
          3. Custom Business Components
            1. Writing a custom component
            2. Registering the component
            3. Using the component
        6. The DHTML Edit Control
          1. Installation
          2. Properties and Methods
      2. 20. Internet Information Server Applications
        1. An Introduction to Internet Information Server 4
          1. Main Features
          2. The Microsoft Management Console
            1. Computers and directories
            2. Web site, directory, and file properties
            3. Browsing the Web site
          3. Active Server Pages
            1. ASP basics
            2. Server-side VBScript programming
            3. Server-side ActiveX components
        2. The ASP Object Model
          1. The Request Object
            1. Sending data to the server
            2. Receiving data from the client
            3. The ServerVariables collection
            4. The Cookies collection
            5. Other properties and methods
          2. The Response Object
            1. Sending data to the browser
            2. Cookies
            3. Page attributes
            4. Redirection
            5. Other properties a\nd methods
          3. The Server Object
            1. Creating external objects
            2. Encoding HTML text and URLs
            3. Mapping paths
          4. The Application Object
            1. Sharing data among clients
            2. The Global.asa file
            3. The Contents and StaticObjects collections
          5. The Session Object
            1. Sharing data among pages
            2. Session events
            3. Locale-aware properties
            4. Session collections
          6. The ObjectContext Object
        3. ASP Components
          1. Using Components in ASP Scripts
          2. Using Custom ASP Components
            1. Writing ASP components in Visual Basic
            2. A real, useful component
            3. Implementing the component
        4. WebClasses
          1. First Impressions
            1. Creating an IIS project
            2. Adding HTML Template WebItems
            3. Connecting a WebItem
            4. Writing code
            5. Extending the example
          2. WebClass Basic Techniques
            1. Accessing the ASP object model
            2. WebClass events
            3. Tag replacement
            4. Custom events
            5. Custom WebItems
            6. The URLFor method
            7. The UserEvent event
            8. The URLData property
          3. The Professional Touch
            1. Navigation
            2. State management
            3. Testing and deployment
    9. A. Windows API Functions
      1. A World of Messages
        1. Multiline TextBox Controls
        2. ListBox Controls
        3. ComboBox Controls
      2. System Functions
        1. Windows Directories and Versions
        2. The Keyboard
        3. The Mouse
      3. The Windows Registry
        1. Visual Basic Built-In Functions
        2. The API Functions
          1. Predefined keys
          2. Working with keys
          3. Working with values
          4. Enumerating keys and values
      4. Callback and Subclassing
        1. Callback Techniques
          1. System timers
          2. Windows enumeration
        2. Subclassing Techniques
          1. Basic subclassing
          2. A class for subclassing
          3. Using the MsgHook class
          4. More subclassing examples
    10. Index