switch between external application

  • Thread starter Thread starter Bart van der Heijden
  • Start date 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
 
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
 
Back
Top