ID Number: Q84067
1.00
WINDOWS
buglist1.00
Summary:
Unpredictable results can occur when you try to call or show a modal
form or window from the Instant Change Scroll custom control Changing
event procedure. Doing a show of a modal form or even using a dialog
box function such as InputBox$ can cause an Unrecoverable Application
Error (UAE) or even a system hang if called from the Changing event
procedure.
Showing a modal dialog box or modal form in a change event of any type
of scroll bar is an improper programming practice, and will lead to
unpredictable results.
This information applies to the INSTSCRL.VBX custom control supplied
with Microsoft Professional Toolkit for Microsoft Visual Basic
programming system version 1.0 for Windows.
More Information:
Below are some examples of using the InputBox$ function from within
the Changing event procedures for both the horizontal and vertical
Instant Change Scroll Bar controls.
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
INSTSCRL.VBX custom control file. The Instant Change Scroll Bar
tools will appear in the Toolbox.
3. Place either an InstVScroll or InstHScroll control on Form1.
4. Add the following code to the InstHScroll1_Changing event
procedure:
Sub InstHScroll_Changing ( )
a$ = InputBox$("hello")
End Sub
-or-
Sub InstVScroll_Changing ( )
a$ = InputBox$("hello")
End Sub
5. Press F5 to run the program.
The machine may either hang or return a UAE.
Additional reference words: 1.00