Microsoft KB Archive/94262

= Computer Hangs When Click Form Without Focus Then CTRL+BREAK =

PSS ID Number: 94262

Article Last Modified on 1/9/2003

-

The information in this article applies to:


 * Microsoft Visual Basic for MS-DOS 1.0

-



This article was previously published under Q94262



SYMPTOMS
VBDOS.EXE causes your computer to hang (stop responding) when the following events occur:


 * 1) Your program executes an uninterrupted processing loop.
 * 2) You click a form that does not have the focus.
 * 3) You press CTRL+BREAK.

To work around the problem, call Doevents periodically from within the loop. This problem does not occur in compiled programs.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The following steps reproduce the problem:

 Start VBDOS.EXE. From the File menu, choose New Form (Form1). Add a Command Button (Command1) to Form1. From the File menu in FD.EXE, choose New Form (Form2). Move Form2 so it does not completely cover Form1. Then save all changes. From the File menu in FD.EXE, choose Exit, and save all changes.  Add the following code to the Click event procedure of Command1: Sub Command_Click Form2.Show For i = 1 To 3000 Form2.Caption = STR$(i) Next 'x% = Doevents ' uncomment this line to work around the problem End Sub </li>  Add the following code to the Click event of Form1: Sub Form_Click MsgBox &quot;Click Successful&quot; End Sub </li> From the Run menu, choose Set Start-up File and select Form1.</li> Run the application.</li> Click Command1, Form2 will be displayed and have the focus.</li> Click Form1.</li> Press CTRL+BREAK.</li></ol>

At this point, VBDOS.EXE causes your computer to hang (stop responding).

Additional query words: VBmsdos buglist1.00 1.00

Keywords: KB94262

Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.