word = textBox1.Text;
            Process myprocess = new Process();
            myprocess.StartInfo.FileName = @"C:\Users\Public\Desktop\Cambridge Advanced  Learner's Dictionary - 3rd Edition.lnk";
            myprocess.Start();

I'm trying to automate a 3rd party app using c# code. I know how to invoke the main window of the app through code using something like this..
but I dont know how to take control of its child windows and its different options and how to send the value of word to its child windows.

Recommended Answers

All 2 Replies

I think what you want to do, is called remoting in .net. Here's the MSDN article on remoting

I did something similar in the past. I had a rather hard time making it works. I suggest the following :
- get the child window handle from the Process object (MainWindowHandle property)
- set this window as the foreground window using SetForegroundWindow (unmanaged function)
- loop until GetForegroundWindow() is true, then use SendKeys to send your message to the child window.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.