views:

616

answers:

2

I'm currently planning out a project involving creating a shell replacement for Windows (based on Blackbox, bblean specifically). However I wish to leverage the power of .NET to do so. Many of the API calls I'll need are housed within the User32 library. I can of course use P/Invoke and create a static class to handle this for me.

However, a lot of this functionality is already available in the .NET framework, specifically in the System.Management namespace for dealing with processes and active windows, etc. Some of it seems to be missing, for example the SetForegroundWindow functions.

Are you aware of anything built into the .NET framework that already provides this functionality, or will I need to take the P/Invoke route?

+3  A: 

I was recently experimenting with creating my own windowing system, really just create new borders around all the windows, but it required a lot of functions from the Win32 API that I add to P/Invoke in.

But there is a ready to-go library in .NET that wraps most of the Win32 API already found here

Cory
+1  A: 

Unofrtunately, for a lot of things you will have to go the P/Invoke route. Fortunately, there's pinvoke.net with definitions for a lot of Win32 APIs.

Franci Penov