title: Using C# to take a screenshot of the Opera Mobile emulator
body: <p>I have some problem that bother me for few days..</p>
  
  <p>I need to do the following..
  start a process (with some arguments), find the window of the process, take a picture of that window, and kill the process
  and I need to repeat this operation X times..</p>
  
  <p>I can start the process, using user32: find its main handle, get the window size, so I know the size of the image, set the window position to 0,0, and make it topMost, and than copyFromScreen metod to capture that image.. from 0,0, to size of the window..</p>
  
  <p>So it look like everything is ok, but there is one problem that I can't solve..</p>
  
  <p>when the process is started, I notice that to use the setWindowPos native function, some time should pass so I use Thread.sleep(x seconds), but
  that time is different on every system.. and that is the problem.. I must know how long delay to make on every system.. and I can't let big unnecceary delay because the process repeats hundreds of times.. and every millisecond is important,</p>
  
  <p>Please if You have some solution, I will be happy to hear..</p>
  
  <p>the process is opera mobile emulator..
  other solution is to use sendMessage, and change the url, instead of starting the process over and over.. and
  I will wait once, but that also doesn't work..
  using Spy++ I try to find details about the process, like className .. and it says invalid window..
  so I probably can't use sendMessage too..</p>