Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C# (http://www.programmingforums.org/forum16.html)
-   -   Visible form but without interaction. (http://www.programmingforums.org/showthread.php?t=15387)

const Mar 11th, 2008 4:57 AM

Visible form but without interaction.
 
Hello, I make a simple application just for fun that it will convert the whole desktop into an aquarium (or varied themes) :icon_wink:. Currently, I have figured out what to do but I would like gather some other opinions just to make sure that I do not do anything wrong.

I have a form that:
  • has no controls
  • is maximized to screen resolution
  • it sits on top of other windows
  • and shows an icon on system tray

I will use this form for varied GDI+ algorithms (pixel capturing,editing,and display) while passing all user input (like mouse, keyboard and other available focus functions) to desktop environment, as normal.

This form must be visible to user's eye, but invisible to focus and input (act like a "ghost" form). How can I do that?

Thanks!

OpenLoop Mar 11th, 2008 6:26 PM

Re: Visible form but without interaction.
 
So, in other words, you want to draw directly to the Desktop? I don't know how to do this in .NET (or if you can), but if you go down to the native Windows programming level you can get the Device Context of the desktop and then treat it like any other window. You can do this in VC++ using:
:

  1. HDC desktopHdc = GetDC(NULL);

Now that you have the dc of the desktop, you can pass it to GDI+ functions to draw on.


All times are GMT -5. The time now is 4:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC