error in open exe application in vb.net
Please Help me:
While open exe in my vb.net Project i got a error your were middle of somthing it.... and it throws invalid operation exception.
My code:

Dim strexe As System.Diagnostics.Process
If strexe IsNot Nothing AndAlso Not strexe.HasExited Then
strexe.Kill()
Else
Dim strProcessinfo As System.Diagnostics.ProcessStartInfo
strexe = New System.Diagnostics.Process()
strProcessinfo = New System.Diagnostics.ProcessStartInfo(Application.StartupPath & " \sales\Sales.exe", "Sales")

strexe.StartInfo = strProcessinfo
strexe.StartInfo.UseShellExecute = False
strexe.StartInfo.RedirectStandardOutput = True
strexe.Start()
End If

-------------------Please help me anybody-------------------

Suppose Ur Current project is project1 & u want to call Exe named Project2 ,Then it that case go to debug folder of project1 & copy exe project2.Now call it simple.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Call Shell(Application.StartupPath & "\" & "Project2")
    End Sub

Hai sonia sardana:
Thanks for your idea.
I got a Solution For that issue,
I have the own user controls dependency files that are missing in the current execution path then i copy & paste that file , my pblm solved.

regards,
santhosh

Suppose Ur Current project is project1 & u want to call Exe named Project2 ,Then it that case go to debug folder of project1 & copy exe project2.Now call it simple.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Call Shell(Application.StartupPath & "\" & "Project2")
    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.