my vb.net(**or c#**) project and external application
the external application is developed by delphi.
i want to extract information from this application (extract cells from the `TStringGrid` control).
image:
http://i.stack.imgur.com/lbtNf.png
extract the `1 2 str str` into my Vb.net project.
To make it more convenient to solve the question this is the download of the `external` application:
http://www.4shared.com/get/GsXJMSGz/Project1.html
this is my code so far:
Declarations:
Expand|Select|Wrap|Line Numbers
- <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
- Private Shared Function FindWindow( _
- ByVal lpClassName As String, _
- ByVal lpWindowName As String) As IntPtr
- End Function
- <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
- Private Shared Function FindWindowEx(ByVal parentHandle As IntPtr, _
- ByVal childAfter As IntPtr, _
- ByVal lclassName As String, _
- ByVal windowTitle As String) As IntPtr
- End Function
- The Code:
- Dim TheMainForm As Integer = FindWindow("TCells", "Cells")
- Dim GV As Integer = FindWindowEx(TheMainForm, 0, "TStringGrid", "")
It is very important to resolve this question because without it my project will not move forward.