text: how can i call user32.dll in c# ?   you will want to use what is called "p/invoke" otherwise known as "platform invoke".  for example, to call "findwindow()" from user32.dll, you could use the following declaration:  [dllimport("user32.dll", setlasterror = true)] static extern intptr findwindow(string lpclassname, string lpwindowname);  note, you will need to use the "system.runtime.interopservices" namespace in order to use the dllimport attribute.  a good wiki for finding the necessary p/invoke declarations for win32 api functions from various win32 system dlls is included below: