Mike Lewis
Programmer
Just come across an interesting problem. I wonder if anyone else has seen this.
1. The application has a main form that runs in the main VFP window in the usual way (in other words, the main form's ShowWindow is "1 In Screen").
2. The main form launches a top-level form (ShowWindow = 2 - As Top-Level Form), with its own taskbar button.
3. The top-level form launches a modal form. Because I want the modal form to be contained within the bounds of the top-level form, I set its ShowWindow to "1 In Top-Level Form".
So far, no problem. Everything works as expected.
But what if the user switches back to the main form (via Alt-Tab or the Windows taskbar) while the modal form is open?
The behaviour I see in those circumstances is not completely consistent, but most of the time the application appears to hang. That's not surprising, given the the app is in a modal state, so the user cannot interact with the main form.
When the user then tries to go back to the top-level form (again, via Alt-Tab or the Windows taskbar), either that doesn't work (the top-level form cannot be activated), or the top-level form does become activated but is now completely frozen. The only way out is to switch back to the main form and attempt to close the app, which itself doesn't always work.
Has anyone else come across this scenario? And if so, any suggestions for avoiding it?
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro tips, advice, training, consultancy
Custom software for your business
1. The application has a main form that runs in the main VFP window in the usual way (in other words, the main form's ShowWindow is "1 In Screen").
2. The main form launches a top-level form (ShowWindow = 2 - As Top-Level Form), with its own taskbar button.
3. The top-level form launches a modal form. Because I want the modal form to be contained within the bounds of the top-level form, I set its ShowWindow to "1 In Top-Level Form".
So far, no problem. Everything works as expected.
But what if the user switches back to the main form (via Alt-Tab or the Windows taskbar) while the modal form is open?
The behaviour I see in those circumstances is not completely consistent, but most of the time the application appears to hang. That's not surprising, given the the app is in a modal state, so the user cannot interact with the main form.
When the user then tries to go back to the top-level form (again, via Alt-Tab or the Windows taskbar), either that doesn't work (the top-level form cannot be activated), or the top-level form does become activated but is now completely frozen. The only way out is to switch back to the main form and attempt to close the app, which itself doesn't always work.
Has anyone else come across this scenario? And if so, any suggestions for avoiding it?
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro tips, advice, training, consultancy
Custom software for your business