Shelled Program and wait for third application

  • Thread starter Thread starter Mohsen Aghazadeh
  • Start date Start date
M

Mohsen Aghazadeh

In my application I wait for a shelled application to finish and
continue to work. Everything works fine but when the shelled program is
up and user tries to open other applications (outside of my
application) they will not be opened till the shelled program finishes.
I appreciate you help on this issue.
Thanks,
Mohsen
 
* Mohsen Aghazadeh said:
In my application I wait for a shelled application to finish and
continue to work. Everything works fine but when the shelled program is
up and user tries to open other applications (outside of my
application) they will not be opened till the shelled program finishes.
I appreciate you help on this issue.

Please post the code you use to wait for the shelled application to
finish.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
 
I tested both following methods:

'----(Method 1)----
If File.Exists(lsCasewareAppLocation) Then
Shell(lsCasewareAppLocation + " " + Chr(34) + lsSelectedFile +
Chr(34), AppWinStyle.NormalFocus, True)
...
Else
....
End IF

'----(Method 2)----
If File.Exists(lsCasewareAppLocation) Then
Dim pInfo As New ProcessStartInfo()
pInfo.FileName = lsSelectedFile
Dim p As Process = Process.Start(pInfo)
p.WaitForInputIdle()
p.WaitForExit()
....
Else
....
End IF




Thanks
 
* Mohsen Aghazadeh said:
I tested both following methods:

'----(Method 1)----
If File.Exists(lsCasewareAppLocation) Then
Shell(lsCasewareAppLocation + " " + Chr(34) + lsSelectedFile +
Chr(34), AppWinStyle.NormalFocus, True)
...
Else
....
End IF

'----(Method 2)----
If File.Exists(lsCasewareAppLocation) Then
Dim pInfo As New ProcessStartInfo()
pInfo.FileName = lsSelectedFile
Dim p As Process = Process.Start(pInfo)
p.WaitForInputIdle()
p.WaitForExit()
....
Else
....
End IF

I am not able to repro that with "notepad.exe".

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
 
Actually that problem happens on client site when they try to run an
accounting software and it never happen in development area or with
regular applications.
Anyway in the second method that I wrote you don't need to mention about
application name, just data name and the application will be opened if
the data file is already associated with the application.
But In the first method we need to mention about the application name
for example lsCasewareAppLocation is a variable that contains EXE
filename and lsSelectedFile is a varible containing the datafile
associated with the application.
I am wondering maybe there is something in the selled or third
application property that cause this problem.

Mohsen
Software Developer
www.focusbusiness.com
 
Back
Top