JB,Thanks for the reply.
infact, you can use the process to identify that any of your required
process is running or not ..
Secondly when you activate the window, you dont have to go the co-ordinates
of the program .. because the hWind has the activity set to that process.
For the final concept of reading the window.. blah .. blah .. request you to
explain more in detail to understand your requirement better
HTH
"JB" <jamesb...@gmail.comwrote in message
news:ff**********************************@1g2000pr g.googlegroups.com...
I'm trying to write an application to read another program, to capture
the screen, read some text and then write it into a database.
The data i need to get will always be at the same point on the
program's window - but i dont have the first idea how to go about
starting it..First I need to see if the program is running
Then I need to get the screen co-ordinates of the program.
Then read data from the window, both text from a text-box of sorts, as
well as some images..Can anyone point me in the direction of how to get started, if it is
even possible?I did used to use a macro recorder which did a similar task, but it
was never very customizable and often quite unreliable. I had to set
it to alt+tab out of the window, then copy and paste into another
form, and etc.
This had the problem, for example if the form hung the macro wouldnt
realize it and would try to carry on...Cheers all
So the first part is looking easy enough. As for the next part:
Well I have a winform which has a few text boxes and 1 image.
The text boxes, well i suppose they are pretty standard. The font and
size will always be the same if that would be an issue.
The boxes will always be at the same position on the window, and the
window always the same size.
I just need to be able to read the text from these text boxes, then
process and import into my database.
As for the image, well each 'page' on the form will have a status, and
for some very peculiar reason it is displayed as an image.
It will either be a green tick, red cross or orange/yellow question
mark.
Image always the same size etc.
So would it be possible?
It seems feasible in theory - get a handle to the text box control and
read from it, but i cant see it being that simple....