Home
  Latest posts
  My Writings
  My Code
  My Gallery
  About me
 
  rssfeed Syndication
 
Bloggtoppen.se
 
 
Links
  Cornerstone
  SweNug
 
Post categories
  misc (48)
  Architecture (21)
  C# (19)
  Asp.Net (2)
  Vb.Net (2)
  Training (7)
  Data (19)
  Events (40)
  Platform (2)
  Orcas (4)
  Updates (3)
  Methods (10)
  Tools (6)
  Announcements (14)
  Languages (1)
  Patterns (6)
  Opinions (11)
  Fun (3)
  Ineta (1)
  Opinion (0)
  Practices (2)
  WCF (5)
 
 
 
Activate an external application
Patrik Löwendahl - cshrp.net

This little piece of code uses P/Invoke and SetForegroundWindow and ShowWindow to activate an external process (application). It is the C# version of the Visual Basic.NET AppActivate. Usage:

        Interaction.AppActivate("Notepad");
        - or -
        Interaction.AppActivate(45667);

Download [7kb]