devxlogo

August 21, 1997

Sorting Data Within a Datagrid

Data is sorted by using the “ORDER BY” clause in a SQL statementand then assigning the SQL statement to the RecordSource property of thedata control that the DataGrid is bound

Keyboard Shortcuts

Yes, these shortcuts are in the manual, somewhere, but it’s helpfulto brush up on them. Using keystrokes is usually faster than using themouse to do the same thing. Photocopy these

Build Your Own Floating Toolbar

Ever wanted a floating toolbar? To make one form “owned”by another, all it takes is a simple API call. Afterwards, the owned formwill float above the form that owns it,

Change the Container of a Control

I use bounded text boxes within the picture control but they act asif they belong to the form. Here’s how to make them act as if they belongto a container

Use Smaller Graphics to Save Resources

Larger bitmaps used for .ListPicture/ListPictureSel properties in Mh3DListconsume proportionally larger amounts of resources. Also, avoid using 256-colorbitmaps in controls–they too consume more resources.

Giving Forms a 3-D Look

It’s not widely known that you can use CTL3D.DLL (or CTL3DV2.DLL) togive your VB forms the same 3-D look of Microsoft’s Office suite of applications.First, your app must register with

Indenting Code Blocks

You can highlight a block of text in the code window and press theTab key to indent the block or Alt-Tab to unindent it.

Troubleshooting Custom DLLs in VB

If you’re getting GPFs and you aren’t sure if the cause is your customDLL or VB, write a BAS file stub that simulates your DLL. If the GPFs persist,its not

Disabling All Controls on a Form

If you ever need to disable all the controls on a form you can loopthrough the control array and set each Enabled property to Falsewith this code: Sub cmdArray_Click ()