Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Know the windows (forms) open, at runtime
Message
From
10/08/2000 12:56:42
 
 
To
10/08/2000 12:48:38
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00403491
Message ID:
00403497
Views:
11
Hi Gerardo,

I think you may be looking at this from the wrong perspective. If you want which form is open to control the main application toolbar, then put the enable/disable behavior in the Form class that the forms are created from.

What I do is put a SyncToolBar method in my Form class. I call this method from the GotFocus and LostFocus of the Form class. What SyncToolBar does is enabled or disable toolbar buttons as appropriate. If the user goes from one form to the other, the buttons will enabled/disable automatically. If the last form is closed, same thing.

There is no code in the toolbar itself for enabling or disabling.

See?



>Hi guys, heres a global view of what i want to do.
>
>I want to disable certain buttons of a toolbar when 'any' form it's open, right now i'm using and a timer, and this one has the next code:
>
>THISFORM.SETALL("Enabled",.t.,"commandbutton")
>if wexist("PRECIADO") or wexist("logon") or wexist("ventas") or wexist("sobre") OR WEXIST('CONSUMOS') OR WEXIST('TRASP_RESURT')......
> THISFORM.SETALL("Enabled",.f.,"commandbutton")
> thisform.IE_BUTTON1.enabled=.t.
>ENDIF
>
>heres the question:
>I dont want to tell the wexist command the name of the window, cause when i add a new form, i have to modified the code of the timer, because i want to disable the buttons, when any form it's open.
>
>Thanks and Gracias
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform