Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total frustration with form hierarchy
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00822160
Message ID:
00822162
Views:
13
Rex,
Might this have something to do with the focus being sent to the grid on the modeless form. If that grid is not refreshed do the modal forms shut down correctly?
Just a thought.
Caroline

>Hi,
>
>Can somebody please suggest a reason as to why VFP is bypassing forms opened in sequence and placing the focus on the top level modeless form? I raised this issue about a week ago and had some suggestions which I adopted but the problem still has not gone away.
>
>I use VFPV7SP2 and WinXP Home. From the top level modeless form, my application opens in sequence a number of modal forms to collect data for a family history application. Up to five levels of modal forms may be opened in sequence and then need to be closed in sequence. However, when moving back through the forms VFP jumps over some of them and activates the top level modeless form leaving the other forms incomplete and on top - without any way of activating them!
>
>This is most disconcerting to my users, and yes, I have doubled checked to ensure that the 'modal' forms are actually modal.
>
>I THINK the problem may be related to the bottom level modal form which needs to move the record pointer and refresh a grid in the form (eSourLst) below it. I have deduced this mainly because the problem only seems to happen (randomly) whenever this form is opened. Sample code is as follows:
>
>LOCAL cFind
>
>WITH THISFORM
> cFind = ALLTRIM(UPPER(.txtTitle.Value))
> .nRow = 0
> .pbNext.Enabled = .F.
> .pbSelect.Enabled = .F.
>
> GO TOP
> SCAN WHILE !EOF()
> IF AT(cFind,UPPER(title)) > 0
> eSourLst.GrdData.SetFocus()
> eSourLst.ShowDetail()
>
> .pbSearch.SetFocus()
> .nRow = RECNO()
> .pbNext.Enabled = .T.
> .pbSelect.Enabled = .T.
> EXIT
> ENDIF
> ENDSCAN
> IF .pbSelect.Enabled = .F.
> .lblFindMsg.Caption = "No Records found for " + cFind
> ELSE
> .lblFindMsg.Caption = ""
> ENDIF
>
>ENDWITH
>
>Solutions that I have tried so far are to include a THIS.SetFocus() and/or THISFORM.Activate() in the method that calls the next form but after the call.
>
>Thank you in advance for any ideas.
>
>Yours in desperation....Rex
Caroline
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform