Reading one program's form from mine

TheWizardofInt

Well-known member
Joined
Dec 31, 1969
Messages
333
Location
Orlando, FL
In VB.Net, how do I get the main form of another programs properties.

For example, I know that TheProg.exe is running, and if I use FinadAnyForm and pass TheProg to it, I will come back with TheProg.exes ID

I assume I should then dim fForm as Form, but then how do I associate fForm with this form I just found?
 
You cant just create a .net windows forms from an hWnd belonging to another program.
 
you would need to get the handle of the program , then find the childwindows of that and then the handles of the controls on the form with FindWindowEx i guess , why would you want to access another program though? why not make yours do what you need?
 
You havent said what this other program is, and why you have to access it yet.
 
The other program is GoldMine, and the program moves data from it to another program, which changes the data and sends it back. GoldMines methods depend in large part on DDE, which is inaccessible in VB.Net
 
You might well find you have to use another language for this. DDE has been dead for some time, although some apps still use it for some reason. Maybe a legacy language like VB6 would be more suited.
 
Back
Top