title: Python: win32gui.SetForegroundWindow
body: <p>I have just written simple script to launch an applciation and I am trying to use "SendKeys" module to send keystrokes to this application. There is one <code>"Snapshot"</code> button, but I cant get Python to click  <code>"Snapshot"</code> button, as the new window is not in focus. So I am planning to use Win32gui module's <code>win32gui.FindWindow</code> and <code>win32gui.SetForegroundWindow</code> functionality. But it gives me <code>error- invalid handle</code>. My app name is "DMCap"</p>
  
  <p>Here is code snippet in Python:</p>
  
  <pre><code>handle = win32gui.FindWindow(0, "DMCap")  //paassing 0 as I dont know classname 
  win32gui.SetForegroundWindow(handle)  //put the window in foreground
  </code></pre>
  
  <p>Can anyone help me? Is this Python code correct? Can I send handle directly like this?</p>