November 27th, 2013, 04:52 PM
Access to variables in another window
I want to write a monitor program that can monitor the variables in another totally separate program running in another window. I am writing both programs so I know the name and type of each variable.
Example: I start a VB program called Clock and it simply displays the time. Inside that program are three variables called hours, minutes, seconds
I start another vb program called monitor. It needs to detect the clock program and monitor the three variables.
This is just one of many possible examples. What I really want is to be able to configure the monitor program so that it can monitor variables in any program that I write. And I want to do this outside the debug environment.
I don't need the specific code although that would be nice. What I need is the process to go about detecting if a specified program is running and then gain access to the known variables inside it.
November 27th, 2013, 06:23 PM
Variable names are non-existent in a compiled program. They are just pointers to memory addresses that vary every time the program is loaded. The only way I know of to do what you are asking is to write a .DLL program and expose the functions that will return the information you seek. That's what happens when you declare a system function and make a call to it.
November 27th, 2013, 06:27 PM
Thanks, I'll give that some thought.