FIX: Setting Add Watch May Cause Your Program to Reset

ID: Q94290


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 query words: buglist2.00 fixlist3.00 2.00 3.00

Keywords :
Version : WINDOWS:2.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 20, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.