Common Dialog Control Array with 163 Controls Can Hang VB

ID Number: Q84550

1.00

WINDOWS

buglist1.00

Summary:

Under Windows 3.0, if you load 163 Common Dialog custom controls to a

Visual Basic form from a control array, you may hang your program at

run time. The Common Dialog control, CMDIALOG.VBX, is a custom control

that provides an interface between Visual Basic and the routines in

the Windows dynamic link library COMMDLG.DLL.

The problem appears to occur under Windows 3.0, but not under Windows

3.1.

Microsoft has confirmed this to be a problem with the Common Dialog

custom control provided with Microsoft Professional Toolkit for

Microsoft Visual Basic programming system version 1.0 for Windows. We

are researching this problem and will post new information here as it

becomes available.

More Information:

Steps to Reproduce Problem

--------------------------

1. Run Visual Basic, or from the File menu, choose New Project (ALT,

F, N) if Visual Basic is already running. Form1 is created by

default.

2. From the File menu, choose Add File. In the Files box, select the

CMDIALOG.VBX custom control file. The Common Dialog custom control

tool appears in the Toolbox.

3. Add a Common Dialog control (CMDialog1) to Form1.

4. Set the Index property of CMDialog1 to 0 to make it a

control array.

5. Add the following code to Form1 Click event procedure:

For i% = 1 to 255

Load CMDialog1(i%)

Debug.Print i%

Next i%

6. Watch the debug window. The program will hang on loading control

number 162. Note that 0 through 162 means 163 controls.

Additional reference words: 1.00