So, I am having an application which is intended to operate with another application autonomously.
Example:
1.Open application A, which start application B
2.Click on a button 1 and click on the input text

The problem is that Application B is not mine and I want to automate a button click there. I know that button 1 is located 20px from bottom right corner, but I don't know height and width of the window of application B. Is it possible to get width and height of that window in C#?

Recommended Answers

All 3 Replies

what language? In C and C++ (probably otheers too) you can call win32 api functions to get a handle to another application. But if start App B by calling CreateProcess() then it will give you the necessary handle.

It is C# as I mentioned in my initial post.

We can't look at everyones initial post, and assume that that stick with only one language. :P

I beleive you would get faster and probably better answers on the C# subforum.

Assuming that you're on Windows (yes, C# is cross platform), then I think you're looking for this guy and this guy as well as this guy. Import DLL's with System.Runtime.InteropServices.

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.