devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

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.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

Store Multiple Values in a Tag

It would often be convenient to store multiple values in the Tag property. Here are two simple functions that help you do that. The first function stores the value in

Select a Whole Row in Any ListView

Only in VB6 do the common controls OCX files provide an option to select a full line in a listview. In earlier versions, you can select a ListItem only by

Find the Error-Generating Line

After trapping an error in debug mode with the usual “On Error Goto ErrorHandlingCode”, you might be frustrated that you can

Return Empty Arrays Too

With VB6 came the ability to return arrays from functions. Returning an uninitialized array is a problem because there is no easy way?other than error-trapping?to find whether an array has

Calculate Finishing Time

If you ever wondered how some DOS applications, such as Norton Utilities, calculate the estimated finishing time for a long process, here

Add Incremental Search to a Combo Box

As the user types into a drop-down combo box, he or she passes keystrokes to the ComboIncrementalSearch routine, which then searches the combo box

Customize the IDE Toolbar

The VB Integrated Development Environment (IDE) contains many toolbars and menu functions, and the functions you normally use are usually on different toolbars and menus, so most programmers have several

Force the Short-Circuit

To optimize the If construct, separating testing conditions (“And” operator or “Or” operator) in different expressions can improve the performance. For example, don

Reading Binary Data from an ifstream

To read a binary value from an input file stream (ifstream) object, use the read() member function. read() takes two parameters: char * and long, which hold the address of

Parenthesize Macro Arguments

It’s a good idea to parenthesize every macro argument. For example: #define MAX(x,y) (x)>(y)?(x):(y) The parentheses ensure that the macro is evaluated correctly, even if the user passes complex expressions

Serializing a Polymorphic Object

A polymorphic object has one or more virtual functions. When you serialize such an object to a file so that it can be reconstituted later, the deserialization might rewrite its

Writing Binary Data to an ofstream

To write the binary value of a variable to an output file stream (ofstream) object, use the write() member function. write() takes two parameters: const char * and long, which

CUDL – A class to create UDL files

‘ A class that creates UDL files for use as ADO Data Sources.’ Universal Data link files are handy for select data sources but there’ are lack of a way

Fill a Combo with Available Drive Letters

To create a drop-down control with a list of used or unused drive letters, place two ComboBox controls on a form, named Combo1 and Combo2, and include this code to

Don’t Create a Recordset Unless It’s Required

When running action queries make sure you add the adExecuteNoRecords option, so that a recordset is not created. You can also use this technique in lookup situations when returning just

Float Buttons Over Tab Panels

When using the SSTab control to build a tabbed dialog, I often find the design more pleasing when the OK/Cancel buttons or other controls appear on every tab. It