
ListView Controls Don’t Accept Numeric Keys
In a collection object, such as the ListItems collection from the ListView control, or simply a generic VBcollection object, you can specify a key to uniquely identify the item. Documentation

In a collection object, such as the ListItems collection from the ListView control, or simply a generic VBcollection object, you can specify a key to uniquely identify the item. Documentation

In VB4, DBGrid’s columns can be referenced using object variables. Thisreduces the amount of typing required and makes code more readable. Thecode is also more efficient because the full name

I have found a solution to the problem of GetModuleUsage not workingin 32-bit VB4. The TaskID returned by Shell can be used by AppActivatelike this: TaskID = Shell(“DOSAPP.EXE”, _ vbNormalFocus)

Jet 3.0 (32-bit VB4 only) includes a new security system basedon database passwords that you may use instead of the more complex,more secure, workgroup security system. This system allows youto

Set the number of columns in VB4’s DBGrid at design time by right-clickingon the grid and selecting Edit from the menu. (The grid can now be editedinteractively at design time.)

A new Windows 95-only API call notifies the system that you’ve changedsomething it should know about. The call, SHChangeNotify, is very handyin a number of cases. You might make this

VB4’s commands for dealing with file names (such as KILL, MKDIR, andFILECOPY) support long file names without programmer interaction. A numberof the Win95 API functions will return only the short

The ShellAbout API call provides a quick and easy way to show an aboutbox (using the standard Win95 format) without having to include an additionalform in your project. The call

MouseMove events don’t occur when the control’s Enabled property is set to False. My method tackles this problem and is useful when you want to display the Tooltips or Notes

If you’re checking a numeric value against 0, one option is to usethe “” operator: If iNumber 0 Then … End If It is faster, however, to check the variable

I’m developing a database program that deals with many auxiliary files at same time. Everyone codingdatabase programs must create some temporary files to produce an output from SQL or a

Pay close attention to the color selections you make in your forms.Windows 95 gives the user more control over colors than previous versionsof Windows allowed. problems arise if the user

Use the connect parameter of the OpenDatabase method to open adatabase that is password-protected in VB4-32. For example, thiscode opens the Secure database with a password of “dirt”: Dim wrk

Windows 95 is a preemptive multitasking system. As a result of this,no single application monopolizes the entire CPU at any given time. Manyof the DoEvents() calls previously used in Windows

This routine allows you to put a fairly accurate time delay, veryuseful for I/O routines and nice, graphic-delayed drawing routinesin your code: Sub Delay (milliseconds As Integer)’ This Routine uses

Windows text boxes always work in insert mode and don’t provide anoverstrike mode. However, overstrike mode can easily be emulated as shownhere: Sub Text1_KeyPress (KeyAscii As Integer) If KeyAscii >=

One way to speed list-box loading is to eliminate the constant redrawingrequired while loading. You can do this by calling the LockWindowUpdateAPI. LockWindowUpdate accepts an HWND as a parameter to

VB4 introduces the use of double-byte characters. Most of this is transparentto the programmer and requires no special consideration. When calling APIfunctions or reading/writing to a file VB will handle

Most of the time, I wish to start VB and resume the last project I was working on, but I don’t like to littermy desktop with program icons for works

Most Windows API routines are functions and must be declared assuch, but in many cases we are not really interested in theirreturn value. The SendMessage function, for example, dependingon the

When you’re creating a database that simulates a client’s database forreporting purposes, errors such as “MSAccess Error: Buf Too Short”or “Error Detected by Database DLL” may occur if fields expectedby

When using the Val function, VB has a quirk that causes a type mismatch error. For example, Val(“25%”)correctly returns 25, whereas Val(“2.5%”) misinterprets the string and returns a type mismatch

If you want to show the character “&” instead of having it work as a marker for the access key, set theproperty “UseMnemonic” to False. This property is useful, for

A form’s control box property usually controls both the system menu(control box) and the close button (X in the top right corner) on the form.If the ControlBox Property is set

At times it’s useful to have a function that cleans a string of unwanted characters. This small function acceptsthe string you want to clean and the characters you want to

You can determine the class of an object using the TypeName function instead of the If TypeOf statement.Use the TypeOf statement to determine the type of object: If TypeOf myObject

Each image that is displayed in a TreeView or ListView control mustfirst be placed in an ImageList control. If many items are placed in thecontrol, it will run out of

Most Windows applications include the following commands in the helpmenu: Contents Search For Help On… How To Use Help Although VB doesn’t provide direct support for these commands,they can easily

A straight ASCII compare, such as ‘F “A” < "B"THEN' is much faster then using VB's StrComp("A", "B",1). However, when you use this test to sort an array of strings,

 Related Posts Discovering the Reason for Poor Query PerformanceMicrosoft partners with OpenAI to catch up in AI raceBlack box vs. White box TestingCA Acquires BlazeMeterAgile and the Decision-Making Process