title: How do I read cells of another program's TStringGrid control?
body: <p>How can I extract items from other application's gridview? The class name of the control is <code>TStringGrid</code>.</p>
  
  <p>I can get the handle of the <code>TStringGrid</code> window with <code>FindWindowEx</code> using these declarations:</p>
  
  <pre><code>&lt;DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)&gt; _
  Private Shared Function FindWindow( _
   ByVal lpClassName As String, _
   ByVal lpWindowName As String) As IntPtr
  End Function
  &lt;DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)&gt; _
  Private Shared Function FindWindowEx(ByVal parentHandle As IntPtr, _
                    ByVal childAfter As IntPtr, _
                    ByVal lclassName As String, _
                    ByVal windowTitle As String) As IntPtr
  End Function
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>    Dim TheMainForm As Integer = FindWindow("form", "fname")
      Dim GV As Integer = FindWindowEx(TheMainForm, 0, "TStringGrid", "")
  </code></pre>
  
  <p>How can I extract the items from GV (TStringGrid handle)?</p>
  
  <p>(I have to finish this project by tomorrow.)</p>