Log in

View Full Version : Need to get contents out of TStringGrid


microbyte
June 26th, 2009, 03:28
Code:
object sg1: TStringGrid
Left = 0
Top = 0
Width = 297
Height = 199
Align = alClient
Color = clWhite
DefaultColWidth = 32
DefaultRowHeight = 15
DefaultDrawing = False
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = []
Options = [goFixedVertLine, goFixedHorzLine, goRangeSelect]
ParentFont = False
TabOrder = 0
OnDrawCell = sg1DrawCell
OnMouseDown = sg1MouseDown
OnMouseMove = sg1MouseMove
OnMouseUp = sg1MouseUp
OnMouseWheelDown = sg1MouseWheelDown
OnMouseWheelUp = sg1MouseWheelUp
OnSelectCell = sg1SelectCell
end


I have this StringGrid. Any way to get the value of each string?

dELTA
June 28th, 2009, 07:41
You really need to give more info if you expect any help... Do you already have the source of the target? What's the target written in? Where did you get that property listing from? Other info?

microbyte
June 28th, 2009, 16:07
Sorry. You are absolutely right.
I'm trying to get the values of each cell of this table.

I didn't write that program, but I know it is written in Delphi.

Image:
http://img146.imageshack.us/img146/8527/dmxwindow.png

dELTA
June 28th, 2009, 17:37
You skipped answering several of my questions, so the answer will be short (but still useful)...

Identify the entry-points of all (relevant) methods of the TStringGrid, then read the TStringGrid docs, then use these methods (by means of code injection) to accomplish whatever you want with the grid and its contents.

microbyte
June 29th, 2009, 05:11
So, from what I understood, as I don't have the source code, I will need some DLL Injection, right? Can you point me some good tutorials on this?

That program is called NAME OF SOFTWARE REMOVED BY MODERATOR and is a software that controls the light fixtures on the shows. The DATA shown on this table are BYTES (0-255). What I want is to get that DATA (512 values) into my own application (VB.NET). Any ideas?

I am totally unaware of how to identify the "entry-points", the methods and also manipulate them by DLL injection.

JMI
June 29th, 2009, 10:25
If your are "totally unaware of how to identify the "entry-points", the methods and also manipulate them by DLL injection" it is time for YOU to spend some quality time with your favorite search engine and you do the homework of learning what you want to accomplish without punting the assignment to others.

This is not a kindergarten where someone is supposed to take you by the hand and save you from actually thinking about your own project and making the personal effort to learn about what it is that YOU want to accomplish.

I know you will not see it at the moment, but making the personal effort and then eventually finding what you want will actually be more satisfying in the long run, even though it will certainly take more time.

So how about YOU put things like "DLL injection" and "entry-points of TStringGrid" and actually read the TStringGrid docs, as dELTA suggested.

Regards,