devxlogo

August 2, 1997

Evaluating Elapsed Minutes

You might need to keep track of the total minutes between one date or time and another. To get the totalminutes, use a line like this: lTotalMinutes = Minutes(Now) –

Show an Hourglass When Processing Data

Have you ever forgotten to add code to set the MousePointer back to its default at the end of a procedureor function? This technique simplifies showing and resetting the MousePointer

Current Computer Name on Windows 95/NT

You often want to know the name of the current computer running Windows 95 or Windows NT in your VB program. Use this simple wrapper function of a kernel32.dll API

Shortcuts for the VB Environment

1) In VB5, pressing Ctrl-F3 when the cursor is over a word automatically searches to the next occurrenceof that word, bypassing the search dialog. You need to be past the

Show Fonts as you Select Them

To let a user change a font name, load all the fonts into a combo box: Private Sub Form_Load() ‘ Determine the number of screen ‘ fonts. For I =

Get all Matching Files in a Directory Structure

Because this code doesn’t use an API, you can easily port it between 16- and 32- bit applications. TheDirWalk procedure lets you search an entire directory structure starting at whatever

Trap Right-Clicks on TreeView’s Nodes

The TreeView control gives your apps a good Windows 95 look and feel. However, the VB manual doesn’texplain how to trap the right mouse button in a node. The Treeview_MouseDown

Getting UserID on Windows 95 and NT

You often want to get the user ID of the current user on the machine running Windows 95 or Windows NT.Use this simple wrapper function of an API function to

Run VB Using the Sendto Menu

Adding a “Shortcut to VB.exe” and “Shortcut to VB32.exe” to your “Send To” menu lets you right-click onany VBP project and open it with your choice of VB4 16/32 or