How can I produce an OSD in Windows?
I want to create an on-screen display, i.e. text or simple graphics that appear on top of everything else being displayed. I know in Linux this is achieved with xosd, but how do you do it in Windows? (Assume XP and up if it makes it easier, and I would also be interested in kno开发者_运维知识库wing if the method is different in Vista/7)
You can use NativeWindow to do this as described here.
The article explains how to create an OSD window with animation/semi-transparent effects, in C#, using the NativeWindow class.
Use the WS_EX_LAYERED
style to make the window transparent, and SetWindowPos(..., HWND_TOPMOST, ...)
to make it float above other windows.
You can call SetForeGroundWindow
精彩评论