mrpatil
asked on
how to pass process to wait state
i want to transfer the process from running state to wait state how i can perform this using vb.net
e.g
i want to transfer the" windows media player " running state to wait state for 5sec.
e.g
i want to transfer the" windows media player " running state to wait state for 5sec.
try WaitForInputIdle method
threading.currentthread.sl eep(5000) ?
>i want to transfer the" windows media player " running state to wait state for 5sec.
Do you want to pause the playback?
It would be helpful if you comeback and answer our comments!
Do you want to pause the playback?
It would be helpful if you comeback and answer our comments!
ASKER
sorry for late comment
no i don't want pause only playback
i want to wait/stop working of media player for 5sec
no i don't want pause only playback
i want to wait/stop working of media player for 5sec
>i want to wait/stop working of media player for 5sec
The work media player does is to play movies/songs. Do you want to pause it but keep the track playing?
The work media player does is to play movies/songs. Do you want to pause it but keep the track playing?
ASKER
media player it just for example
i want to wait/stop working of application select by user for seconds
i want to wait/stop working of application select by user for seconds
Make function that passes the time and add this :
Threading.Thread.Sleep(500 0)
Threading.Thread.Resume()
This will freeze the program for 5sec, so if you want your program to be active, make sure you start a different thread to do your task and use the function above to freeze hold it for an amount of seconds..
Hope this helps...
Threading.Thread.Sleep(500
Threading.Thread.Resume()
This will freeze the program for 5sec, so if you want your program to be active, make sure you start a different thread to do your task and use the function above to freeze hold it for an amount of seconds..
Hope this helps...
>Hope this helps...
It wont! If you read again that the discussion is about freezing a third party application such as a standalone media player not our own application!
It wont! If you read again that the discussion is about freezing a third party application such as a standalone media player not our own application!
CodeCruiser you're right, overlooked that part...
Well then the answer is simple, you can't just suspend/resume a processes
(to my knowing that is, CodeCruiser what's your view on this ?)
For media player you could try API calls (sending keys to the application or something), but this will be different for each application.
Well then the answer is simple, you can't just suspend/resume a processes
(to my knowing that is, CodeCruiser what's your view on this ?)
For media player you could try API calls (sending keys to the application or something), but this will be different for each application.
ok did some googling and found this :
http://www.codeproject.com/KB/threads/pausep.aspx
http://www.beyondlogic.org/solutions/processutil/processutil.htm
http://www.codeproject.com/KB/threads/pausep.aspx
http://www.beyondlogic.org/solutions/processutil/processutil.htm
ASKER
can i set priority of that process to low
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.