Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Focus after closing modal form?
Message
From
06/03/2006 09:15:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Focus after closing modal form?
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
MySQL
Miscellaneous
Thread ID:
01101701
Message ID:
01101701
Views:
85
In the case where a modal form calls another modal form, when the second modal form closes what decides where focus goes back on the original form. For instance, I click on a button on a modal form and that button.click() causes the creation of a new modal form..when this form is closed, where does focus go? Automatically back to the original modal form? Any particular widget?

In case anyone's interested..here is my problem:

Just for some quick background..I am tracking down a c0000005 that seems to be related to the WindowType property on a form. There is a modal form with some various widget objects(combobox,radiobutton,textfield,listbox,etc..) that also has a close button. When you press the close button, if some of the widgets do not contain data, a message box(basically a modal form with that returns yes/no depending on the users click) is displayed and the user must answer. If the user *clicks* on 'NO', then the message box goes away and then the original form is released. The problem is that if a listbox, radiobutton, or combobox has focus before I press the close button on the form, if I then answer 'NO' to the message box popup by clicking on it, the original form then releases(after the message box does) but a c0000005 comes from the line that made the DO FORM call when it returns. If focus is on the textbox before clicking on the close to get the popup, the problem does not happen. Also, if I make the form Modeless the error does not happen. Also, if I have the radiobutton/listbox/combobox with focus before I press close, but then I tab or use the arrow keys to move over to the 'NO' choice(as opposed to clicking on it) the error doesn't happen..
Next
Reply
Map
View

Click here to load this message in the networking platform