switch between external application

  • Thread starter Bart van der Heijden
  • Start date
B

Bart van der Heijden

Hi,

I am creating a sort of desktop application. My problem is that word and
excel (and other external applications) are not responding to the
SetFocus method (or setforegroundwindow or bringwindowtotop or other
methods from user32.dll). Is there a posibility to do this handy in c#
or do i need to call a certain sequence of methods to give an
application the focus?

Best regards,

Bart
 
S

Stoitcho Goutsev \(100\)

Bart ,

There is no managed solution of doing this. You need to use PInvoke and
Windows API.

Both methods that you mentioned should do the truck for word and excel. I
guess you pass a wrong HWND
 

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

Top