Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

Re: OPEN EFM SCRIPT AND CLOSE TO AVOID MULTIPLE ISTANCES

$
0
0

So you want to close the second form by clicking a button on the main form? 

 

You may want to use Scripting.Globals to pass a "message" between the two forms, something like this:

 

In the main form's initialization code:

     Scripting.Globals("MyForms_Close") = 0

 

In main form's button click handler:

     Scripting.Globals("MyForms_Close") = 1

 

In the second form, have a loop that checks this value and either exits or sleeps:

     Do Until Scripting.Globals("MyForms_Close") = 1

           Scripting.Sleep 500

     Loop

     TheView.Cancel

 

John


Viewing all articles
Browse latest Browse all 4541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>