Hiding Oengine & Oinsight from task bar (OpenInsight Specific)
At 12 DEC 2000 08:04:47PM Peter Richards wrote:
Hi,
I have successfully used the code supplied by Don Bakke as follows:
Declare function FindWindow, ShowWindow
hWnd1%=FindWindow("RTI_OINSIGHT":\00\, "")
hWnd2%=FindWindow("AREV":\00\, "")
rv=ShowWindow(hWnd1%, 0)
rv=ShowWindow(hWnd2%, 0)
to hide the Oengine and Oinsight windows, they do not appear on the task bar. However, on exiting the application, both Oengine and Oinsight are still in the task list. If I then try to go back into the application (trying to replicate what a user would do), the msg:
"Application Manager
Cannot start a new application without command line switch"
appears. When I cancel Oinsight from the task list, I am able to go back into the application okay, no messages. Of course I do not want the user to have to go to the task list, and cancel Oinsight every time he/she requires to go back into the OI application.
What do I do ? On a (application) main menu CLOSE event, get the handle again for Oinsight, show the form, then close it ? What is the clean method ?
Peter
At 13 DEC 2000 10:01AM b cameron wrote:
Peter,
In the create event of the "Start" form I do ….
call Yield() ;* processes any pending requests
hWnd1%=FindWindow("RTI_OINSIGHT":\00\,"")
hWnd2%=FindWindow("AREV":\00\,"")
rv=ShowWindow(hWnd1%,0)
rv=ShowWindow(hWnd2%,0)
call Yield()
Return 0
Then in the Close event of the same form….
call Yield()
hWnd1%=FindWindow("RTI_OINSIGHT":\00\,"")
hWnd2%=FindWindow("AREV":\00\,"")
rv=ShowWindow(hWnd1%,2)
rv=ShowWindow(hWnd2%,2)
RETURN 1
Bruce
At 13 DEC 2000 11:49AM Donald Bakke wrote:
Peter,
It sounds to me like you are testing this on a development engine. OI/OE will not shutdown after you close your main application window. Try this with a runtime engine or launch OI in runtime mode (i.e. /DV=0) first.
At 13 DEC 2000 10:37PM Peter Richards wrote:
Don,
Oops, now I'm blushing, yes, I did try it on the Dev OI. Just tried it with the runtime OI application, and neither of the tasks were shown on the task bar whilst in the application, and when I exited, none of the tasks were left in the task list.
Many thanks,
Peter
At 13 DEC 2000 10:39PM Peter Richards wrote:
Hi Bruce,
I will add the yield() function and add that extra code in the CLOSE event as you suggested.
Thanks,
Peter
At 08 JAN 2001 11:31AM Colin Rule wrote:
Your Close event could also use the system destroy utility…manual says:
An OpenInsight application will close when the main application window closes. To close an OpenInsight application programmatically, use Utility("DESTROY", "SYSTEM").
Colin Rule