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

Force a Single Select for a Grid

Setting the SelectionMode property of the MSFlexGrid to flexSelectionByRow forces all columns in a row to be selected rather than a single cell. It also allows selection of multiple rows

Setting Layer/DIV Background Colors

Often it is desirable to set a background color for an entire layer or DIV region, much like setting the background color for a whole table. Setting a layer background

Stacking Layers Above Embedded Objects

When designing a Web page that contains CSS layers (DIV sections) and embedded objects (Java applets, plugins, or ActiveX controls), keep in mind that embedded objects do not obey zIndex

Modernize Your Toolbar Look

Using only a few Windows API calls, you can change the standard VB5 toolbar into an Office 97 look-alike. I’ve implemented two display styles for the toolbar. The first allows

Copy Drawn Picture to Clipboard

The VB Picture control can hold several different formats of pictures: BMP, DIB, ICO, CUR, WMF, and others under VB5. Additionally, you can use graphics methods to “draw” on the

Floating an Edit Box

To minimize the number of controls on my forms, I use a text box as a floating input control that I either overlay onto a grid or swap with a

Erase a Variant Array

You’ll find the IsArray() function helpful when you use Variant arrays that you can set or unset through your code and need to test often. However, once you declare the

Yet Another CenterForm Routine

In the April 1997 issue of VBPJ, you published a tip called “Consider the Taskbar When Centering Forms.” You can center forms more easily with the SystemParametersInfo API call: Private

In Search of Sample Code

I’m always looking for sample code, and the setup1.vbp file is an excellent source of reusable code. It comes with VB and is part of the VB setup kit. The

Force an MDI Window Refresh

I sometimes want an MDI parent window to be repainted. For example, if a modal dialog is displayed over the MDI form and you click on OK, the dialog is

Hiding VBScript and JavaScript from Old Browsers

Web page “graceful degradation” means making new capabilities invisible to older browsers that don’t support them. Many authors hide VBScript or JavaScript code inside an HTML comment so that older

Preventing Undefined JavaScript Function Errors

You can define JavaScript functions anywhere in an HTML file, however, the best place to define them is in the HTML header (between the and tags). If a JavaScript function

Checking for an Uncaught Exception

A thrown exception is considered caught, when its corresponding handler has been entered (or, in case such a handler cannot be found, when unexpected() function has been invoked). Sometimes you

Getting Table Cell Background Colors to Display

Some browsers do not display a table cell’s background color unless the cell contains some HTML content. It is often handy to use table cell background colors to “paint” a

STL Iterators are not Necessarily Pointers

Most implementations of STL (Standard Template Library) use pointers as the underlying representation of iterators. However, an iterator doesn’t have to be a pointer, and there’s a good reason for

A Workaround for Namespace-less Compilers

Since namespaces are relatively new in C++, some compilers do not support this feature yet. To workaround this lack of support, you can use struct holding static member functions: struct

Invoke “Open With …” Dialog Box

When launching a data file with the ShellExecute() function, Windows tries to find the associated application and open the data file with this application. But what happens if no association

SSTab vs. Option Buttons

Although VB’s SSTab control behaves as if each tab page is a container, it actually uses a single container for all tab pages. This can cause unexpected behavior if you

Deleting an Array Element

Conventional wisdom suggests that to delete an array element, you must move up all the subsequent elements to close the “gap” left by the deleted item. However, if the sequence

Use setTooltipText to Display Entire Title

A nice feature of programs like Netscape’s newsreader is the ability to display the entire title of an article even though only part of it fits in the list box

Use Object.equals(), not ==, for Logical Comparison

One of the most common gotchas for beginning Java programmers involves comparing Objects, especially Strings, with the == operator. Every Object in Java has a unique location in the Java

Beginning Swing-Based Applications

When you begin all Swing-based applications, you must set the look and feel and add a WindowListener so that when a user clicks on the exit box, the program exits.

Using JToggleButtons Inside the JToolBar

JToggleButtons work well when you want buttons that stay down or up inside the JToolBar. You can also make them behave like Radio buttons (only one button down at a