Microsoft KB Archive/94290

= FIX: Setting Add Watch May Cause Your Program to Reset =

Article ID: 94290

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition

-



This article was previously published under Q94290



SYMPTOMS
You may encounter the error message, &quot;Module has changed; must reset&quot; after which the program ends and returns to design mode. Setting a watch point contributes to the problem.

In general, this problem occurs under the following conditions:


 * A global, form, or module-level watch point is set.
 * The watch point refers to a Visual Basic object such as a form or control.
 * The watch point is evaluated from break mode when a modal form is showing.



STATUS
Microsoft has confirmed this to be a bug in Microsoft Visual Basic version 2.0 for Windows. This bug was corrected in Microsoft Visual Basic version 3.0 for Windows.



Steps to Reproduce Problem
 Start Visual Basic, or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. From the File menu, choose Open Project and open the sample program MDINOTE.MAK. This sample is located in the SAMPLES\MDI directory in your Visual Basic directory. From the Debug menu, choose Add Watch (ALT, D, A). In the Add Watch dialog, enter Forms.Count as the watch expression and choose the OK button. From the Run menu, choose Start (ALT, R, S) or press the F5 key to run the sample. From the File menu of the MDINOTE sample program, choose Open (ALT, F, O).</li> From the Visual Basic Debug menu, choose Break (ALT, R, k) or press CTRL+BREAK to break execution.</li>  Locate the cmdcancel_Click event procedure within FILEOPEN.FRM. From the Debug menu, choose Toggle breakpoint (ALT, D, T) or press the F9 key to set a break point on the following statement: FileForm.txtFileName.Text = Empty </li> From the Run menu, choose Continue (ALT, R, C) or press the F5 key to continue running.</li> Choose the Cancel button. Execution stops at the break point you set in step 8.</li> From the Debug menu, choose Single step (ALT, D, S) or press the F8 key to single step.</li> Repeat step 11 until you receive the following error message:

Module has changed; must reset

</li> Choose the OK button, and Visual Basic will reset from break mode and return to design mode.</li></ol>

Additional query words: buglist2.00 fixlist3.00 2.00 3.00

Keywords: kbbug kbfix KB94290

-

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

© Microsoft Corporation. All rights reserved.