0
  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.

3
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by caKus
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.