Article ID: 139971
Article Last Modified on 11/18/2003
<DBGrid Name>.Visible = False
causes another Paint message to be sent to the DBGrid control, but this
time the grid behaves correctly and hides itself. The workaround is to
place this line of code (shown above) in the Reposition event of the data
control. Whenever a data control executes a Refresh method, or any of the
Move methods, the Reposition event is called, and this line of code causes
the correct painting to occur.
Another workaround is to move the DBGrid control off of the visible section
of the form when it should not be seen. You can use a line of code such as
the following:
DBGrid1.Move -5000, -5000To make the DBGrid visible again, move it back to the correct location on the form.
DatabaseName: <path to your VB directory>\biblio.mdb
RecordSource: Authors
Private Sub Command1_Click()
Data1.Refresh
End Sub
Private Sub Data1_Reposition()
DBGrid1.Visible = False
End Sub
Additional query words: 4.00 vb4win vb4all buglist4.00
Keywords: kbbug KB139971