Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am trying to start an external application by sending th e required arguments as part of the command line call. Everything works fine but the external app opens up behind what ever application is at the top. I am also using the sendkey for {F6} so the the application will do a function. But the application will not open over the other apps. If I use an input box for the arguments before opening the external application then it runs fine. Here is the code that I have. Can anyone help?

 

Public Sub runArdis()

'Time to open Ardis and generate patterns

Dim myProcess As New Process()

Dim startInfo As New System.Diagnostics.ProcessStartInfo("COWIN.exe")

 

startInfo.FileName = "j:\projects\" & curProject & "\PATTERN\" _

& ProductType & Phase & "\" & patProd & Phase & ".R41"

 

 

startInfo.WindowStyle = ProcessWindowStyle.Normal

 

 

Try

myProcess = System.Diagnostics.Process.Start(startInfo)

Catch ex As Exception

MsgBox("runArdis Error! " & ex.Message)

End Try

 

 

End Sub

Posted

I was able to use the call shell(".......") that included all of the arguments that I needed. So I no longer have to use the sendkey and teh program runs no matter what the window status is.

 

Call Shell("c:\ardis\ThisProgram.exe j:\projects\" & curProject & "\PATTERN\" _

& ProductType & Phase & "\" & patProd & Phase & _

".R41 /Start=c:\ardis\Optimize.mco", AppWinStyle.NormalFocus)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...