FIX: Setting Add Watch May Cause Your Program to Reset

Last reviewed: October 30, 1997
Article ID: Q94290
2.00 WINDOWS kbenv kbbuglist

The information in this article applies to:

- Microsoft Visual Basic programming system for Windows, version 2.0

SYMPTOMS

You may encounter the error message, "Module has changed; must reset" 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.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic, or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running.

  2. 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.

  3. From the Debug menu, choose Add Watch (ALT, D, A).

  4. In the Add Watch dialog, enter Forms.Count as the watch expression and choose the OK button.

  5. From the Run menu, choose Start (ALT, R, S) or press the F5 key to run the sample.

  6. From the File menu of the MDINOTE sample program, choose Open (ALT, F, O).

  7. From the Visual Basic Debug menu, choose Break (ALT, R, k) or press CTRL+BREAK to break execution.

  8. 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

  9. From the Run menu, choose Continue (ALT, R, C) or press the F5 key to continue running.

  10. Choose the Cancel button. Execution stops at the break point you set

        in step 8.
    

  11. From the Debug menu, choose Single step (ALT, D, S) or press the F8 key

        to single step.
    

  12. Repeat step 11 until you receive the following error message:

        Module has changed; must reset
    

  13. Choose the OK button, and Visual Basic will reset from break mode and

        return to design mode.
    


Additional reference words: buglist2.00 fixlist3.00 2.00 3.00
KBCategory: kbenv kbbuglist
KBSubcategory: EnvtDes
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.