Set foreground window

  • Thread starter Thread starter AA2e72E
  • Start date Start date
A

AA2e72E

Given the handle of a window, is there a way to make it the foreground window
using C# (rather than win32 API)?
 
I can do this quite easily using Win32 APIs from unmanaged code; I am trying
to avoid unmanaged code.

As well as the handle, I can get the caption.

Basically I am using an out of process COM server to which I need to send
instructions via SendKeys; for this, I need to make the COM server visible (I
can) and be the foreground window.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top