title: capture selected text from other applications problem
body: <p>I wrote a small sample of code in C# to capture selected text from other applications:</p>
  
  <pre><code>SendKeys.SendWait("^c");
  string searchedText = Convert.ToString(Clipboard.GetText());
  </code></pre>
  
  <p>my problem is its not working if i captured text from the browser Chrome
  anyone know why this happen or if there is another way to do the same task</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I am doing this application to capture selected text from any other application and save it in a file when the user press a hot key.</p>
  
  <pre><code>protected override void WndProc(ref System.Windows.Forms.Message m)
      {
          // let the base class process the message
          base.WndProc(ref m);
  
          // if this is a WM_HOTKEY message, notify the parent object
          const int WM_HOTKEY = 0x312;
          if (m.Msg == WM_HOTKEY)
          {
                  SendKeys.SendWait("^c");
                  string searchedText = Convert.ToString(Clipboard.GetText());
                  Save(searchedText);
                  Clipboard.Clear();
          }
      }
  </code></pre>