ID Number: Q77838
1.00
WINDOWS
buglist1.00
Summary:
This article documents a problem where Visual Basic will fail to
repaint a context box when the cursor is moved to a different line.
Under certain circumstances, after execution of the program has been
stopped by a breakpoint, editing multiple lines of code will cause
multiple context boxes to be drawn in the code window.
A context box is a rectangle that is drawn around a line of code in a
Visual Basic code window. The context box gives a visual indication
of where in the code the program has stopped.
Microsoft has confirmed this to be a problem in Visual Basic
programming system version 1.0 for Windows. We are researching this
problem and will post new information here as it becomes available.
More Information:
Steps to Reproduce Problem
--------------------------
1. Run Visual Basic and choose New Project from the File menu
(ALT, F, N).
2. In a new project, double-click on the form to bring up the
Form_click event procedure.
3. Enter the following code in the Form_Click event procedure of
Form1:
sub Form_Click()
'x = 1
'x = 2
x = 3
end sub
4. Set a breakpoint on the line "x = 3" by moving the cursor to that
line and pressing the F9 function key.
5. From the Run menu, choose Start.
6. Click on the form.
The application will break at the "x = 3" line of code as
expected.
7. Click at the beginning of "x = 3" line and add a single apostrophe
(') to comment it out.
8. Click at the beginning of the "x = 2" line and remove the
apostrophe.
9. Similarly click at the beginning of the "x = 1" line and remove
the apostrophe.
10. Click on the first line of code that reads: "Sub Form_Click()".
Note: Visual Basic 1.0 will draw three context boxes. There is a
context box around both the first and second lines of code (gray
rectangle framing the text: x=1 and another around x=2). There is
also a tiny rectangle at the beginning of the line containing "x =
3."
11. Minimize the code window and maximize it again to refresh the
code window. Only the rectangle around the first line remains
(line: "x = 1" has a context box around it).
Additional reference words: 1.00