ISBN: 1-893-11522-4
TITLE: David McCarter's VB Tips and Techniques
AUTHOR: McCarter, David
TOC:

Introduction 
How to Use This Book 
How to Use the Tips in This Book 
Code Naming Conventions 
Getting the Example Source Code 
Getting Updates to the Example Code 
Contacting the Author 
Chapter 1 Some Hot Tips to Get You Started 
Setting Up the Visual Basic Design Environment 
Deleting Multiple Items in a ComboBox and ListBox 
Adding Cut, Copy, Paste, and Undo Features Quickly 
Moving Files without All the Work 
Chapter 2 Tips on Working with Strings and Arrays 
Returning an Array of Fixed Length Strings 
Avoiding "Array Locked" Errors 
New Visual Basic 6 String/Array Features 
Chapter 3 Tips on Working with Controls 
Using the Validate Event instead of LostFocus 
Verifying that TextBox Entries Are All Nonempty 
Automatic Selection of Text 
Keeping Text Highlighted When the Focus Moves Away from a Control 
Ignoring Keyboard Characters in a TextBox Control 
Using a TextBox Control to Get the Effect of a Scrolling Form 
Turning Off Word Wrap in a RichTextBox Control 
Adding the Default Context Menu to a RichTextBox 
Using a RichTextBox to Add a Quick Save/Load File Capability 
Toggling ListView Sorting Order Like You Can with Explorer 
Removing Selected Items from a ListView Control 
Getting the Number of Items Selected in a ListView Control 
Grid Printing Made Easy 
Clicking an Object Using the Windows API 
Viewing an Oversized Picture Using Scroll Bars 
Extending the Timer Control to Intervals beyond the 65.5-Second Range 
Using the Syslnfo Control to Determine When the Hardware Environment Changes 
Using Windowless Controls to Make Properties Read/Write at Runtime 
Taking Advantage of Adding Controls Dynamically at Runtime 
Chapter 4 Disk and File Tips and Tricks 
Getting a File Name from a Path (Before Visual Basic 6) 
Getting a File Name from a Path (After Visual Basic 6) 
Creating a Full Directory Path 
An Optional Way to Create a Full Directory Path 
Finding a File in Drives or Folders 
Copying Files by Using Version Checking 
Copying Files with a Progress Indicator 
Finding the Path of a Loaded File 
Finding the Total Space Available on a Drive 
The New File System Objects 
Retrieving Drive Information using File System Objects 
Using the Scripting Engine to Work Recursively on the Directory Structure 
Chapter 5 Tips and Tricks to Use with Forms 
Adding a Form to the Add Form Dialog Box 
Making a Form Elastic 
Making a Form Stay on Top of All Other Windows 
Adding Items to a ControlBox Menu 
Tileing a Bitmap across a Form 
Displaying Forms within a Form 
Bringing MDI Forms to the Top 
Making MDI Child Forms Act Modally 
Automating an Options Dialog Form 
Creating Non-Rectangular Forms 
Chapter 6 Tips from the World of WindoL4s API 
Detecting a Sound Card or Speaker Driver 
Launching Programs or Files from Your Application 
Rolling Your Own GUIDs 
Verifying a User's Log-in Password 
Getting the Current User's Name 
Getting a Machine Name 
Opening or Closing the CD-ROM Door 
Getting a List Separator Based on Geographic Locale 
Creating Improved DoEvents for NT Users 
Adding Pop-Up Help to Your Program 
Adding Quick Search to ListBoxes and ComboBoxes 
Chapter 7 Tips on Visual Basic and the Internet 
Using the WebBrowser Control to Build a Customized Browser 
Using the Application Wizard to Build Your Special-Purpose Browser 
Watching for Backslashes in Web Addresses 
Printing HTML Documents with the WebBrowser Control 
Using the Internet Transfer Control to Smart Mine the Web 
Using the Internet Transfer Control to Get Stock Prices 
(And Other Kinds of Data Mining) 
Avoiding the OpenURL Method for Time-Consuming Data Transfers 
Accessing IIS Objects from a Visual Basic ActiveX DLL 
Determining whether RAS Is Connected 
Chapter 8 Database Tips for Visual Basic and Microsoft Access 
Getting Up to Speed on Access Versions 
Three Secret Techniques to Document Your Code in Microsoft Access 
Unloading Your Database Workspace 
Dealing with Enter Keystrokes When Exporting Databases to Text Files 
Avoiding SQL Query Problems from Erroneous Single Quotes 
Dealing with Null Database Fields 
Filling a ComboBox with Data Quickly and Easily 
Adding Security to Access Database Diagra ms 
Opening a Secured Access (Jet) Database with ADO 
Determining Which Version of the Microsoft Data Access Component You're Running 
Using the New Commands that Bring Access Closer to ANSI SQL 
Working with ActiveX Data Objects 
Investing in Microsoft Office Developer 
Getting a Handle on Data Source Names 
Becoming Familiar with Access 2000 Data Access Pages 
Enabling Row-Level Locking 
Creating Crosstab Queries 
Emulating Access Forms in Visual Basic 
Giving the Right Password 
Finding Important New Information on Integrating Access and SQL Server 
Discovering Resources for Migrating from Access to SQL Server 
Chapter 9 Tips and Tricks on Some Advanced Stuff 
An Introduction to the AddressOf Operator 
Detecting whether Your Program Is Running in the Integrated Development Environment 
Using the SHFormatDrive Function to Format Drives 
Visual Basic Runtime Files 
ActiveX Components and Long File Names 
Registering and Unregistering COM Objects Easily 
Chapter 10 Miscellaneous but Nevertheless Super-Useful Tips 
Changing the MousePointer with Class 
Converting Hours to Minutes 
Displaying 3D Text without a Control 
Fixing the "License Information for This Component Not Found" Error. 
Disabling Dr. Watson on Windows NT 
Running Programs at Startup 
Discovering the COMCTL32.OCX, COMCT232.OCX, MSChart.OCX Controls Upgrades 
Getting the Screen Resolution 
Determining Who's Logged onto the Computer 
Invoking the Windows Shortcut Wizard 
Fixing the "Could not be Loaded" Error 
Fixing the "Can't find project or library" Compile Error 
Restoring the Visual Basic IDE Back to Its Original State 
Appendix A Touring the VS Tips & Tricks Web Site 
VB Tips & Tricks Newsletter 
Programming Tips 
Advanced Programming Techniques 
Software Development 
Component Products and Reviews 
VB Dave's Corner 
VB Tips & Tricks Report Cards 
Free Software Contest, Downloads, and More 
Appendix B Visual Basic Information Resources 
Web Sites 
Publications 
User Groups 
Newsgroups 
Visual Basic Insiders Technical Summit 
Microsoft Developers Network 
Appendix C The APIGID32.DLL Library 
Numeric Functions 
Pointer and Buffer Routines 
FileTime Functions 
Miscellaneous 
Index 
END
