Link to home
Start Free TrialLog in
Avatar of mrpatil
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.
Avatar of Kamaraj Subramanian
Kamaraj Subramanian
Flag of Singapore image

try WaitForInputIdle method
Avatar of Nasir Razzaq
threading.currentthread.sleep(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!
Avatar of mrpatil
mrpatil

ASKER

sorry for late comment
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?
Avatar of mrpatil

ASKER

media player it just for example
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(5000)
 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!
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.
Avatar of mrpatil

ASKER

can i set priority of that process to low
ASKER CERTIFIED SOLUTION
Avatar of Kraeven
Kraeven
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial