Author Topic: Is it possible to launch another application from an HMI program?  (Read 6890 times)

tcervas

  • Newbie
  • *
  • Posts: 5
    • View Profile
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Is it possible to launch another application from an HMI program?
« Reply #1 on: June 03, 2013, 06:15:05 AM »
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: [Select]
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        System.Diagnostics.Process.Start("IExplore.exe")
    End Sub

tcervas

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Is it possible to launch another application from an HMI program?
« Reply #2 on: June 04, 2013, 05:31:37 AM »
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

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Is it possible to launch another application from an HMI program?
« Reply #3 on: June 04, 2013, 07:04:02 AM »
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 ;-)