Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Total frustration with form hierarchy
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Total frustration with form hierarchy
Divers
Thread ID:
00822160
Message ID:
00822160
Vues:
35
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
Rex Toomey
ISD Port Macquarie NSW
Australia

'Inside every older person is a younger person wondering what happened.'
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform