Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining the “next” form
Message
From
23/07/1998 13:54:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/07/1998 13:49:11
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00120580
Message ID:
00120612
Views:
22
>>>I’m trying to determine, programmatically, which form on a multi-form screen will have the focus when I remove the active form by pressing it's x close button.
>>>
>>>I tried the following, but the second print statement doesn’t work as there is no ListIndex property in this case.
>>>
>>>for i = 1 to _SCREEN.formcount
>>> ? _SCREEN.forms(i).name
>>> ? _SCREEN.forms(i).ListIndex
>>>endfor
>>>
>>>Zorder doesn’t seem to be the answer either as it seems to give me only top, or not top as an answer.
>>>
>>>Bob
>>If same as tabbing it would be .forms(currentix).tabindex+1.
>>Cetin
>
>Form.Tabindex is ignored if it's not part of Formset. IMO, the way to know the order by sure is keeping some array of form names. When a form comes up, it jumps from line and pushes previosly activeform to the bottom of stack, so this behaviour can be stored in array.

Yes Ed,
With Bob's reply I remembered already forms collection doing that stack work and dynamically changing a form's forms(ix) (but still I also use a control array).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform