Pep
Pep

Reputation: 2027

How can I get another application mainwindow coordinates and style in C#?

How could I get in C# the main window coordinates (left, right, width, height) and main window state (maximized, normal,..) of a third-party application if I have the value of Process.MainWindowHandle for it (obtained from the session processes list)?

Upvotes: 0

Views: 99

Answers (1)

Tony
Tony

Reputation: 7445

I guess you need GetWindowPlacement WinAPI function. Here you can find a great example.

Upvotes: 2

Related Questions