November 2007 Entries

User32's SetForegroundWindow() API in C#

If there occurs a need to check if some process is already running and then bringing that process' main window in front then .NET does not helps 100%. Using the System.Diagnositics.Process class to find out a already running process is a easy task but to bring that process' main window in front is a difficult goal. Here's the code to get the already running process (e.g. Notepad) and then bringing it to front, using the native API from User32.dll >> SetForegroundWindow(int WindowHandle) [System.Runtime.InteropServ...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

«November»
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678