FIX: Grid Control Repaints When Another Form Is Made Active
ID: Q100195
|
The information in this article applies to:
-
Microsoft Visual Basic programming system for Windows, version 3.0
SYMPTOMS
If you activate another form while a form containing a Grid control is
showing, the Grid repaints itself.
CAUSE
When the grid loses focus, it automatically repaints the entire grid.
The grid should only paint the section of the grid that was covered or
changed -- not the entire grid -- when it loses focus.
WORKAROUND
There is no known workaround at this time.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem has been corrected in Visual
Basic version 4.0.
MORE INFORMATIONSteps to Reproduce Problem
- Start Visual Basic or from the File menu, choose New Project (ALT, F, N)
if Visual Basic is already running. Form1 is created by default.
- From the File menu, choose Add File (ALT, F, A) and add GRID.VBX to
the project and add a grid (Grid1) control to Form1.
- From the File menu, choose New Form (ALT F, F). Form2 is created.
- Add the following code to the Form_Load event procedure of Form1:
Sub Form_Load ()
Grid1.Rows = 20
Grid1.Cols = 8
'Initialize the grid with random data
For I = 0 To 19
Grid1.Row = I
For J = 0 To 7
Grid1.Col = J
Grid1.Text = Format$(I) + Format$(J)
Next J
Next I
Form2.Show
End Sub
- From the Run menu, choose start (ALT, R, S) or press F5.
- Position Form2 to cover a portion of the grid, click back and forth
between the two forms, and notice that the grid is repainted each time
Form2 is activated.
Additional query words:
buglist3.00 3.00 fixlist4.00
Keywords : PrgCtrlsCus
Version : WINDOWS:3.0
Platform : WINDOWS
Issue type :
|