Hi
I am building an IX 2.0 application where i am starting an VNC viewer program with a "RUN" command attached to a button . this is working really well every time the VNC Wiever reaches the VNC server , but if it fails the viewer window opens behind my IX runtime . I have unchecked the "Topmost " in the settings menu on IX , but it looks for me like the IX is executed as the topmost application anyway when the runtime starts on the computer.
My question is (tough i am not so experienced with C# yet .) : Is there anyone who can show me how to make a script that tells the IX that it should not be the topmost application ?. I have found the Topmost property in the scripthelp files in IX ,but are unsure how the script should look like. ?
Script for setting IX runtime Topmost/not topmost
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Script for setting IX runtime Topmost/not topmost
If you turn "Top Most" back on, does the VNC viewer start behind iX Developer when it works? I think that the issue is with your VNC viewer, not with iX Developer. If you launch your VNC application using the below code, and top most is turned off, then it is up to the VNC application to decide where it wants to be on the screen. It sounds like your VNC application is programmed to put itself behind any windows that are currently open on your screen if it errors.
You can play with this using the explorer.exe application and see how it behaves when top most is turned on or off.
You can play with this using the explorer.exe application and see how it behaves when top most is turned on or off.
Code: Select all
using System.Diagnostics;
//Starts the Explorer process
ProcessStartInfo startInfo = new ProcessStartInfo("explorer.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
Process.Start(startInfo);
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer