Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal form lost focus and die
Message
From
03/03/2003 17:43:46
 
 
To
03/03/2003 17:32:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00760474
Message ID:
00760596
Views:
18
>>BTW, if you are in VFP development environment when you do this, you don't
>> need to go to the task manager. You can click on program menu and hit
>>cancel.
>
>It's true
>
>>When you are on a modal form, focus cannot be set to another form...unless
>>you launch another child form.
>
>I do not understand you.
>
>What does mean "focus cannot be set ..."? It can. And as I said before : easily. And I have explained how.
>
>So, What are you trying to say me?

Take the example you have given, with the timer, and comment out the timer code in form1.click() method. Drop a commandButton onto form2 (which is modal), and in the click() method, put Form1.SetFocus(), as you have suggested.

Now, run Form1. Click on command1, which launches form2. Then click on the commandButton on Form2. You are semi-stuck now, right? You are in the same condition that the timer would put you in.

My point is that I think you would have problems like this in *any* language, because of the way that modal forms work. When a modal form is running, the user can't change focus to another form (within the same application). I wouldn't expect that your program would (or should) be able to do it, either.
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform