Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open windows menu
Message
De
11/08/1997 15:24:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00044025
Message ID:
00044081
Vues:
29
>>>>Is there a convenient (or automatic) way to list all open windows in a menu pad, allowing the user to choose and activate a window from the menu? This is a common feature in apps, and one would think that it would easily be provided for (like in VB). Thanks.
>>>>
>>>>Erik
>>>
>>>something like this? (i think from taz trader app)
>>>in init of form,
>>>
>>>LOCAL lnBar
>>>
>>>IF TYPE("oApp") == "O"
>>> *-- Find the next available bar number
>>> IF CNTBAR("Windows") = 0 OR ;
>>> GETBAR("Windows", CNTBAR("Windows")) < 0 && At a Fox system BAR
>>> lnBar = CNTBAR("Windows") + 1
>>> ELSE
>>> lnBar = GETBAR("Windows", CNTBAR("Windows")) + 1
>>> ENDIF
>>>
>>> DEFINE BAR lnBar OF Windows PROMPT thisform.caption AFTER _MLAST
>>> lcFormName = thisform.Name
>>> ON SELECTION BAR lnBar OF Windows ACTIVATE Window &lcFormName
>>>ENDIF
>>
>>This is close to what I was looking for... cool code, but- it doesn't take care of removing the item from the menu when the form closes and changing the name of the menu bar when the caption of the form changes, and doesn't SET MARK to the active form. I was hoping for code that would run in the selection of the pad that would scan for all open forms and create the bars there... possibly using the app.aforms array, and SET MARK according to the active form. This doesn't seem terribly complex, and I am not afraid to tackle it myself, I just didn't want to reinvent the wheel if it had been done. BTW- I found an article in the KB outlining how to do this in FPW 2.6, but the code used a system variable '_mwindow' for which I can find no documentation. I just wish VFP had VB's windowlist feature...
>>Thanks for your help.
>>
>>Erik
>
>check the taz trade app (demo project w/ vfp). that should have code that does most of what you want.

I looked in there before posting and couldn't find what you're talking about. Where specificaly in tastrade?
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform