简体   繁体   中英

How Do I Make Any Program's Window TopMost from my Program?

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#.

谷歌浏览器显示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)

流程浏览器

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM