Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi All, I have one problem. I ha

Status
Not open for further replies.

Kadirpatel

Programmer
Mar 28, 2001
43
0
0
GB
Hi All,
I have one problem. I have two child forms, each of them has 10 to 15 controls. Whenever I toggle between the windows all the controls flicker. This is because I'm collecting data from the data base and displaying it to the user. Because of this the flickering of controls take place. I dont want this to happen. Please can any one help me in solving this problem. The data base connection and display of the code is in Activate event of each child form.

Thanks.
 
If possible, populate your controls before the Activate event. You say you're toggling between forms.. are you able to populate the controls while the old form is still showing and only toggle over to the new form after that's done?
The only other solution I'd have would be to set the controls' Visible properties to False while populating then, turn them back on.
 
Don't put DB code in the Activate event - it causes the query to be re-run every time the form comes to the top of the Z-order (very inefficient).

Instead, code a public function on the form that gets called after the form is loaded. So, to display the form, you'd do something like:
Code:
Dim MF as MyForm

Set MF = new MyForm
MF.Load
MF.LoadFromDB
MF.Show vbModal

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top