I'm using FindWindow
, and SetForegroundWindow
from the Win32 API
within via pinvoke
C#. The window is a screen with scrolling text, thats updated randomly, I want to be able to detect when just the specific window has been updated. I'm new to C# how can i do this?
Asked
Active
Viewed 253 times
0

pyCthon
- 11,746
- 20
- 73
- 135
1 Answers
1
You can use the GetWindowText
from User32 if it's a specific control you are trying to monitor for changes.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633520(v=vs.85).aspx
Another method would be to take a screenshot of the window, and compare the last image with the current image to detect changes.
-
i guess i could use spy++ to get the specific control – pyCthon Dec 21 '12 at 21:56
-
1There are also functions that can be used to identify the controls that exist in a window. – Walk Dec 21 '12 at 22:12
-
that would be very useful what are they? – pyCthon Dec 21 '12 at 22:15
-
1Here's an article you may find useful that talks about this: http://www.vbaccelerator.com/home/NET/Code/Libraries/Windows/Enumerating_Windows/article.asp – Walk Dec 21 '12 at 22:17