Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call from a Form to a Top Level Form
Message
From
17/10/2001 04:48:21
 
 
To
17/10/2001 03:31:27
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00569422
Message ID:
00569433
Views:
22
Hi!

It is hard to understand what you want really to do, BUT, in fact:

Top-level form cannot be modal at all. As a result, any command that show a top-level form will not stop execution at that moment no matter what you do - program will continue running after you show that form or use "DO FORM" command. To organize calling of the top-level form from another VFP form, you require just open it or show and do nothing else in the rest of the code after that. The code that does something AFTER top-level form opening should be in another place. For example, in the Unload method of that top-level form. In some event of the main form that checks if top-level form is still opened.

You can also simulate the modality of the top-level form by activating that top-level form by timer. In the timer event, that fire each 0.01 second, check if another form or main screen is active. If yes - force activate required top-level form. For user it will look like if user clicks on the main VFP screen, it is activated, but after that top-level form is activated again immediately. To check if some window is active and activate a top-level form, you probably will require to use Windows API functions to work with windows on the level of Operation System (Windows).

HTH.

>Dear all,
>
>In my Account Program design, A series of password verifiying forms is implemented at the application opening. Afterward a so-called Main Form which select the various companies into a common Top Level Form in which a top level menu is implemented for voucher inputing, report geenerating and etc..
>
>In my design, I intend to let the application releade from the top-form and go back to the Main Form, so that, I can change the company working on. However, the following methods is insucessfully run:
>
>1. Set the Top Level Form modal
> At the commandbutton click to Top Level Form at Main Form click event type:
> :
> thisform.hide
> do form 'TopLevelForm'
> thisform.show
> :
> :
>
>2. Set the TopLevelForm modalless
> At the commandbutton click to TopLevelForm at Main Form click event type:
> :
> thisform.release()
> do form 'TopLevelForm'
> :
> :
> At the Top Level Menu I implement a pad name 'Exit' which coding is
> _screen.activeform.release()
> do form 'Main'
>
>Is there any thing wrong in program design or otherwise, the coding is incorrect??
>
>
>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