-1

I have 2 applications which interact each other. App1 is developed in power builder and App2 is in .Net Power-builder application invoke .Net application to do some stuff. My requirement to lock/disable the the power builder application while .Net application is doing work.

I have done following code in power builder application to lock the active screen but it fails in few scenarios:

mainwindow.enabled=false

Code to invoke .Net application:

Yield() //wait until .Net application complete his work

mainwindow.enabled=true

Any help will be highly appreciated.

Mark Chackerian
  • 21,866
  • 6
  • 108
  • 99
Rahim Ali
  • 11
  • 1
  • How do you invoke your .NET code?! COM? Webservice? Sockets? ShellExecute? by the way try to avoid the use of yield. When using yield there's always another better solution to solve your issue. – user743414 May 31 '17 at 07:06

3 Answers3

1

Usually it helps to by specific about your issue. Actual code helps - something like "code to invoke" isn't really meaningful. But reading between the lines, you are trying to run another program from your PB/classic app and you want your PB/classic app to wait for the program to finish and close before continuing its own execution. If so then try the suggestions here Checking the return code from an application executed

SMor
  • 2,830
  • 4
  • 11
  • 14
1

Try the RunAndWait example at www.topwizprogramming.com. Use it to launch the other app instead of the built in Run function. It will be locked while waiting for the other app to finish.

Roland Smith
  • 957
  • 4
  • 7
0

you better check Checking the return code from an application executed

Muhammad Saeed
  • 81
  • 3
  • 10