Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have 2 applications.
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).

http://i.stack.imgur.com/lbtNf.png[Image!!!]

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:
Download[^]

this is my code so far:

Declarations:
XML
<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", "")


I'm sure that there is a answer to this question.
It is very important to resolve this question because without it my project will not move forward.
Posted
Comments
Abhishek Pant 30-Dec-12 16:21pm    

"I'm sure that there is a answer to this question"
Yes for every question there is a answer! I'll not download anything just post here.

1 solution

The answer was posted here a couple of days ago http://stackoverflow.com/questions/14032860/how-do-i-read-cells-of-another-programs-tstringgrid-control[^]
Essentially, if whoever wrote the Delphi program did not provide a means of getting at the data then you're going to have to do some fairly technical reverse engineering of the program to get at it's information - which may violate a licence
 
Share this answer
 
Comments
jhdsfhsdf123 1-Jan-13 15:21pm    
this is not an answer.
CHill60 2-Jan-13 5:27am    
"This is not an answer" - true. But the answer at the link was reasonably clear ... "Anyway, whilst what you ask for is, in theory possible, in reality it is completely impractical. The sensible solution is to ask the authors of the Delphi program to provide an automation interface."

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900