-
SyncShell in .net
does any one know the equivalent of :
Public Sub SyncShell(PathName, Optional WindowStyle As VbAppWinStyle = vbMinimizedFocus)
Dim dwProcessID As Long, hProcess As Long
dwProcessID = Shell(PathName, WindowStyle)
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, dwProcessID)
If hProcess = 0 Then Exit Sub
Do
DoEvents
Loop While WaitForSingleObject(hProcess, 0) = STATUS_TIMEOUT
End Sub
in .net.
:confused:
-
and in the middle of the night there was an almighty *BUMP*
need the answer :)
Basically I need .net code to wait until the shelled app that I call has finished running.