Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing form Paint() when not active form
Message
From
28/10/2002 03:14:47
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Preventing form Paint() when not active form
Miscellaneous
Thread ID:
00715951
Message ID:
00715951
Views:
52
I have a grid on form A with a container-based control in one column that is fairly slow to refesh due to it's complexity. However, this is no problem because the browse speed is still acceptable.

My problem is that when form B is open on top of the grid, the Paint() method of form A fires repeatedly when the overlying form is moved.

Even though the grid's form is no longer the active form, my container control on the grid continues to effectively refresh and slows things down too much. How can I prevent this?

What makes ths problem even more annoying is that I cannot find a way of switching focus from the grid to another control when form A deactivates without losing the focus on form B!

I have noticed that if another control on form A has focus when form A deactivates, the Paint() method does not fire and everything speeds up. If the grid was the last control to have focus, the container continues to refresh when the form B is moved. I suppose this behaviour would be desirable most of the time were it not for the fact that I have a more than usually complicated grid. It seems there is some relationship between grid refreshing and form Paint() method that I do not understand.
Mark Croasdale
Next
Reply
Map
View

Click here to load this message in the networking platform