|
Home > Archive > FoxPro Help and Support > June 2005 > Run a form from a menu of a main form.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Run a form from a menu of a main form.
|
|
| Ioannis Stefis 2005-06-27, 8:25 pm |
| Hi to all!
I run a modal form from the menu of a main form. When I click again the nenu
I have a new instance of the form. How can I avoid it? I mean something like
to deactivate the menu when the second modal form is running, and therefore
to have just one instance of the form running!
Thanks in advance
Ioannis Stefis.
| |
| Lee Mitchell 2005-06-28, 9:24 am |
| Hi Loannis:
Why don't you check for the existence of the form in the menu button? For
example, something like this:
IF Type("otest")="O"
**disable the menu pad
Else
DO FORM test NAME otest
Endif
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/
*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr
Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
>Hi to all!
>I run a modal form from the menu of a main form. When I click again the
nenu
>I have a new instance of the form. How can I avoid it? I mean something
like
>to deactivate the menu when the second modal form is running, and therefore
>to have just one instance of the form running!
>Thanks in advance
>Ioannis Stefis.
| |
| Dan Freeman 2005-06-28, 8:25 pm |
| The easiest way is to set a SKIP FOR condition on your menu item. You can
use any logical expression. If it evaluates to .t., the menu item is
disabled.
Take a look at Wexist() in the help file. It should take care of you.
Dan
Ioannis Stefis wrote:
> Hi to all!
>
> I run a modal form from the menu of a main form. When I click again
> the nenu I have a new instance of the form. How can I avoid it? I
> mean something like to deactivate the menu when the second modal form
> is running, and therefore to have just one instance of the form
> running!
>
> Thanks in advance
> Ioannis Stefis.
|
|
|
|
|