
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
You can’t clear the contents of a MaskEdBox control by setting the Text property to a null string if the MaskEdBox’s Mask property contains delimiter. In fact, you must include
At times you may want to temporarily hide the mouse cursor, for example in order to reduce flickering. To do so you just need the ShowCursor API function: Private Declare
If a form contains one CommandButton control whose Default property is set to True, the Enter key activates the CommandButton. If the form doesn’t contain any default CommandButton control, however,
Visual Basic doesn’t let you change the Style property of a CheckBox or an OptionButton control at runtime. However, you can easily do it by manipulating the control’s style bit,
When you disable a control, VB grays its contents. However, often this action goes unnoticed by the end users. Here’s a routine that changes the control’s BackColor property in addition
An ActiveX DLL doesn’t have direct access to the environment of the calling EXE. For example, the App and Printer objects in the DLL don’t correspond to the objects with
This utility if for those who hate having to alt-tab over to Outlook every time I wanted to create a new message. With this program, no matter what application is
‘ The shortest item in an array of any type’ (it applies the LEN function to all the items in the array’ and then takes the highest value)” FIRST and
‘ Return the maximum value in an array of any type” FIRST and LAST indicate which portion of the array’ should be considered; they default to the first’ and last
‘ Return the minimum value in an array of any type” FIRST and LAST indicate which portion of the array’ should be considered; they default to the first’ and last
Option Explicit’——————————————‘ A class for dealing with complex numbers’——————————————‘ The main propertiesPublic Real As DoublePublic Imaginary As Double’ Initialize this complex number’ (returns Me)Function Init(Real As Double, Imaginary As Double)
‘ The longest item in an array of any type’ (it applies the LEN function to all the items in the array’ and then takes the highest value)” FIRST and
Here’s a simple method to programmatically insert an image into a RichTextBox control, by copying it into the clipboard and then pasting it into the control: Private Declare Function SendMessage
Often properties and methods associated with grid controls don’t provide an absolute row index of current or selected rows (relative to the actual first row and not the first displayed
Even the latest versions of Oracle
When you are unsure if you need to instantiate an object from your ASP pages, as in the case of instantiating a COM object to access SQL Server, it is
If you need to execute a stored procedure from a Command object, and the stored procedure will not return any rows, you can boost performance of the Command object by
When referencing recordset values in your ASP code, don’t use the commonly used
If you do, then all the pages will fight for the use of this connection. In addition, don’t cache an ADO connection in the Session object. If you do, a
When creating stored procedures in a database other then the Master database, avoid using the ‘sp_’ prefix. System stored procedures are the only ones that should use the ‘sp_’ prefix.
You can use the keywords class and struct in forward declarations interchangeably. For example: class X; // fwd declaration uses ‘class’X *p;struct X // definition uses ‘struct'{};void f(){ p=new X;}
Many symbolic debuggers limit the length of symbols they can display. For example, the Visual C++ debugger can display strings that contain up to 255 characters. Suppose you have a
Suppose you need to define a function that takes a vector object and performs certain operations on it. The function has to be generic, that is, it should handle all
Sometimes you need to make sure that only one instance of the same application can run at any given time. Although every platform defines different locking schemes, you can use
One of the issues that have been discussed at the C++ standards committee is whether the declaration of static member functions is permitted. For example: struct A{ extern
To simplify the process of writing custom function objects, the Standard Library provides two classes that serve as base classes of such objects: std::unary_function and std::binary_function. Both are declared in
The remove_if() algorithms (defined in the standard header ) has the following prototype: template ForwardIterator remove (ForwardIterator first, ForwardIterator last, Predicate pred); The first two arguments mark the sequence’s beginning
The Standard Library defines the std::remove() algorithm, which moves desired elements to the front of a container and returns an iterator pointing to the end of the sequence of the
This control is a great substitute for the ProgressBar included in the Common Windows Controls package and can give a nicer look to your applications. It has a BackColor property,
The ComboBox control exposes the DropDown event, that lets you determine when its list area is being opened. However, VB doesn’t offer any simple way to understand when the list











