General Category > Open Discussion

Is it possible to launch another application from an HMI program?

(1/1)

tcervas:
Hello all;

I'm new to Advanced HMI.  I have been playing with it and was able to link some indicators to a CLX controller.  I think it's very intuitive and seems to be easier to work with than RSView, big Kudos to the developers.

However, I have a project in which I will need to be able to launch another application from the HMI.  I think it would be great if I could use the Multi-form Demo button to launch the application, and also be able to close and return back to the HMI.  Is this kind of thing currently possible?
Any Ideas or input would be greatly appreciated.  Thanks in advance for your help.

Tony

Archie:
Try this:

- Add a button to the MainForm from the ToolBox
- Double click the button which will take you back to the code view
- Enter this one line of code in your click event handler:


--- Code: ---    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        System.Diagnostics.Process.Start("IExplore.exe")
    End Sub

--- End code ---

tcervas:
Hay Archie;

Thanks that worked perfectly.  Now I just need to know where on the system to place my program so that the HMI can launch it instead of IExplore.exe.  Thanks for your help

tcervas:
Ok, I figured it out; I added the path to the program in the parenthases.  For example;

System.Diagnostics.Process.Start("C:\Documents and Settings\electrician\My Documents\MD20\md20ldrw.exe")


Thanks for your help Archie ;-)


Navigation

[0] Message Index

Go to full version