Shelled Program and wait for third application

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
 
H

Herfried K. Wagner [MVP]

* 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>
 
M

Mohsen Aghazadeh

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
 
H

Herfried K. Wagner [MVP]

* 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>
 
M

Mohsen Aghazadeh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top