Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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:
<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 30-Dec-12 10:43am
Comments
Abhishek Pant at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Comments
jhdsfhsdf123 at 1-Jan-13 15:21pm
   
this is not an answer.
CHill60 at 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
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,327
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,920


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 30 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100