Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call from a Form to a Top Level Form
Message
From
18/10/2001 05:38:36
 
 
To
17/10/2001 20:24:32
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00569422
Message ID:
00570110
Views:
16
Hi!

Yes.
You can scan a forms collection of the _screen object:
procedure CheckIfFormOpened
lparameters pcFormName
for i = 1 to _Screen.FormCount
  if _Screen.Forms(i).Name = m.pcFormName
    * form is opened
    return .T.
  endif
endfor
return .F.
The sample function above does check of form with name passed as a parameter opened or exists in the memory. If yes, it returns .T., otherwise - .F. In the menu you have to use this custom function call as expression for "SKIP FOR" condition for each menu item that runs such form.
Each time menu is refreshed, this function will be called and returning result o fthis function will cause enabling or disabling menu item.

HTH.

>Dear Vlad,
>
>In a Top Level Form with a menu to trigger the other forms worked on the Top Level Form. Is there any parameters, to check whether these form is exist on the Top Level Form or not?
>and, Can I disable some entries on the Pad Name/Popup Menu on the Top Level Menu, if the associated form is exist on the Top Level Form??
>
>
>
>With regards,
>
>Ransome
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform