Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing objects
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00172935
Message ID:
00173131
Views:
46
Hi Christof,

If there were no control on the form that could take the focus, this would explain the behavior you are seeing, or if you use VFP 6 and manipulate certain SETTINGS. But with a pageframe on the form and VFP 5 running, this shouldn't take as long.

There are at least 10 controls on the container that can receive focus. Removal of the container is triggered in a commandbutton.click(). So I don't think the absence of controls that can take focus is the problem. Good suggestion though.

One possibility to increase speed could be setting LockScreen to .T.

I do that. The problem is that if for any reason the container is not removed, it is difficult to detect it's presence if it is not visible. In many cases this would make little difference. In this case the containder must absolutely be removed or it interferes with calculations elsewhere.

Another fake possibility would be to make the container invisible and let a timer remove one object after the other while the user can go on working.

That's a neat idea. If nothing else works I'll try it. However, would there not be some interference with the user's continuing to work every time the timer fires -- no, I guess the delay be so short as to be not noticed.

To discover the reason for this behavior I would step by step simplify the form until speed significantly increases. Keeping in mind that with the debugger it runs faster, it's probably nothing in your code, rather one of VFP's basic behaviors that causes this problem.

That is what I am doing now. I have discovered that if the controls on the container are removed prior to the container itself being removed, the time required drops from 24 seconds to under one second.

I am now in the process of testing each class of control individually to see it is causing the problem. If no particular class turns out to be the problem, I will test each separate control.

I already know that it is not the container itself. If I empty the container of all controls (except the cancel button) and then cmdCancel.Click() to remove the container -- its removal is in fractions of a second.

Still looking,

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform