November 18, 1998

Const Iterators

You can think of an iterator as a pointer to elements of a container. All STL (Standard Template Library) containers provide the basic iterator type along with its const counterpart. The const iterator of a container should be used when the elements accessed through it are not supposed to be

Highlight Content in Response to User Mouseover Using DHTML/CSS

You can use Dynamic HTML and Cascading Style Sheets (CSS) to change the color of text on the fly. This functionality can be useful for highlighting a portion of text. This feature appears to have been implemented in Internet Explorer 4, but not in Netscape 4.x. Canine sweaters available in

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 simultaneously. To force a single row selection for a grid, I have a function called UpdateGrid that ensures only one

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 color should work the same for version 4 of both Netscape and Internet Explorer but it doesn’t. The Cascading Style

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 stacking rules or visibility settings but insist on floating above all layers. If you need to dynamically adjust stacking to

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 you to change the toolbar to an Office 97-style toolbar (similar to the one used by VB5), and the second

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 control. The only native method that converts the image on the picture control, including the drawn graphics, to a bitmap

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 label. Here is my swap subroutine: Public Sub SwapControls(cHide As Control, _ cShow As Control, Optional Value) With cHide .Visible

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 array, IsArray() returns True, even if the array has been erased using the Erase keyword. To solve this, reset a

No more posts to show