Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Project Manager windows collection

Status
Not open for further replies.

Toman

Technical User
Mar 30, 2004
190
CZ
I wish a nice day to all.

I'd like to loop through collection of Project Manager windows on my VFP 7 IDE screen. They seem not to belong to _screen.forms collection and the only way how to "contact" them is by means of WVISIBLE, WTITLE and DE/ACTIVATE, HIDE commands.
My task was originally to deactivate all or some of these Project windows and restore them later.
I've found partial solutions with sequence
Code:
HIDE WINDOW all 
 ….
SHOW WINDOW all,
but the ambition to loop through them still persists.
Thanks for any suggestion.

Tom
 
Tom

LOCAL ARRAY lazy(_vfp.Projects.count)
FOR i= _vfp.Projects.count TO 1 STEP -1
lazy(i) = _vfp.Projects(i).name
_VFP.projects.Item(i).Close()
NEXT i



FOR i=1 TO ALEN(lazy)
MODIFY PROJECT (lazy(i)) nowait
NEXT i

Nigel
 
Hi Nigel,

this is exactly what I wanted to know.
Thank you very much, Tom

By the way: how this was solved sooner, when property Projects did not exist
 
We've had the Projects collection since VFP 5. Prior to that, you did have to use the various Window functions.

Tamar
 
Thank you Tamar,

I am afraid that it should read "since VFP 6". All my tries to access project objects on VFP 5 ends with "OLE error code 0x….." message.
Never mind.

Tom
 
You're right. I answered off the top of my head. Now that I look it up, I see it was VFP 6.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top