Tip Bank

DevX - Software Development Resource

Simplify Command-Line Argument Parsing

ArgumentParser simplifies command-line argument processing by separating arguments into positional parameters and options (any argument starting with “-” or “/” is considered an option, which may specify a value). Construct

DevX - Software Development Resource

Create C++ DLLs to be Used in VB Apps

Some C++ programmers develop Win32 API DLLs that can used from Visual Basic programs. Use the __stdcall prefix with functions exported from the C++ DLL that you want to access

DevX - Software Development Resource

Move the Cursor to the Center

Use this simple subroutine to move the mouse/cursor to the center of an object. It’s useful for tab-like functions and default settings: Private Declare Function SetCursorPos& Lib _ “user32” (ByVal

DevX - Software Development Resource

Assure Compatibility

When working with ActiveX DLLs, many VB programmers build a reference DLL first, copy it to a subdirectory of the project directory, and set version compatibility to binary with a

DevX - Software Development Resource

Never Store Arrays of Objects in an auto_ptr

The Standard Library’s auto_ptr class template automatically destroys an object that is allocated on the free store when the current scope is exited. For example: #include //definition of auto_ptr#include using