Drawing above all windows

I have been searching for months on this:

I would like to draw on a transparent window above all other windows. I do not want to disrupt any typing that the user is doing on his current window. 

An example of this type of behavior are the notification balloons. They appear on top of all other windows and they don't seem to bother anyone's typing. They appear out of nowhere but they do not have the keyboard focus. 

How can I accomplish this  

Kind regards, 


Answer this question

Drawing above all windows

  • desperate108146

    OK... a little birdie told me that I should get a desktop context. I haven't looked into it yet, but it seems to make sense. I assume I'll need to call a win32 function. 

    I'll let you know fellas... if you have any info... feel free to respond. 

  • Fuzze

    Sorry didn't read all the posts, another nice class for controlling another window is the NativeWindow class, beats having to use too many unsafe API calls.

  • jschroeder

    topmost = true

    transparent, 

    have another thread that sends back messages to the UI thread of the form to draw, even though the user is focused on another window.

  • SteynPJM

    Man... nobody wants to respond to my questions. 

    Ok... I got it to draw to the desktop but any animation flickers. Why  Because there is no way to do double buffering. Other windows draw and redraw, and all you can do is draw once or loop drawing. 

    That sucks. 

    Another way is to use a transparent form, topmost, and give keyboard focus back to the last window which had the focus. That was fun. 

    I'm using this method (and keyboard hooks) to show the volume bars (like on a TV) above all windows, when you change the volume. I'm also showing the clipboard images in a quick view before you want to paste it. And other little neat fun make-it-easier for my mom to use the computer  things. 

    I was thinking of making a website with these types of fun programs. Anyone interested

  • Drawing above all windows