0

I am writing a glassing program, similar to Glass2k (see image below) as I often need to view my pdf tutorials while working on the program in question.

I have so far been able to write the program that glasses the windows I want (via a global keyboard shortcut).

I now need a way to replicate Glass2k's feature which makes glassed windows stay on top of all windows irrespective of which program I switch to (more like setting a WinForm's TopMost property to True. Is there any way of doing this in .NET?

I'm prepared to get down and dirty with DllImports and all so any suggestion is welcome as long as it is in VB.NET or C#.

Google Chrome showing Glass2k


Edit This is just based on a whim but I could also do with code that allows me to minimize, maximise restore and close any window as is done in Process Explorer? (see image)

Process Explorer

Alex Essilfie
  • 12,339
  • 9
  • 70
  • 108
  • 1
    possible duplicate of [C# make a window topmost using a window handle](http://stackoverflow.com/questions/1528473/c-make-a-window-topmost-using-a-window-handle). I think this is what you want. – Nathan Taylor Sep 01 '10 at 17:17
  • http://blogs.msdn.com/b/oldnewthing/archive/2005/06/07/426294.aspx – BFree Sep 01 '10 at 17:23
  • @Nathan Taylor: Sorry for the duplicate. I guess I didn't search SO well enough before posting this question. I was able to find a 'managed' class library which does what I requested and more. I posted it as an [answer to this question](http://stackoverflow.com/questions/3620505/how-do-i-make-any-programs-window-topmost-from-my-program/3628562#3628562). – Alex Essilfie Sep 02 '10 at 15:23
  • no harm done! No need to apologize to me. This is just intended to be community driven. Your question is perfectly valid, it just sometimes requires digging. I actually had a somewhat difficult time locating that post and the only reason I made the effort is because it seemed like it had probably already been asked by someone. :) – Nathan Taylor Sep 02 '10 at 17:27

1 Answers1

0

I found out that a lot of work had been done by Michael Schierl on wrapping PInvokes in managed code. This is his site: Managed Windows API.

It turns out that the library is quite extensive and covers a lot of the commonly used PInvokes, makikng it very useful in Upper-Intermediate application development.

Nathan Taylor
  • 24,423
  • 19
  • 99
  • 156
Alex Essilfie
  • 12,339
  • 9
  • 70
  • 108