Putting window inside the desktop
-
Hi, I am trying to make a kind of desktop widgets using C#. So far, I've managed to create a window that gets added to the WorkerW window containing SHELLDLL_DefView. This way, my main form is inserted inside the desktop window over the wallpaper. This is exactly what I want except that I have a little problem. It seems like there is an opacity of 50% and a black is rendered as transparent. I don't know where this comes from and I don't know if I can change it. Does anybody knows what might be causing this and how can I fix it? The code I used to do this is pretty simple. I find the handle to the WorkerW window that contains the SHELLDLL_DefView window as a child and then I call those functions to insert my own form inside as a child :
SetParent(this.Handle, hWndParent);
SetWindowLong(this.Handle, -16, new IntPtr(GetWindowLong(this.Handle, -16) | 0x40000000));Here's how it looks when the form is in the desktop Thank you
-
Hi, I am trying to make a kind of desktop widgets using C#. So far, I've managed to create a window that gets added to the WorkerW window containing SHELLDLL_DefView. This way, my main form is inserted inside the desktop window over the wallpaper. This is exactly what I want except that I have a little problem. It seems like there is an opacity of 50% and a black is rendered as transparent. I don't know where this comes from and I don't know if I can change it. Does anybody knows what might be causing this and how can I fix it? The code I used to do this is pretty simple. I find the handle to the WorkerW window that contains the SHELLDLL_DefView window as a child and then I call those functions to insert my own form inside as a child :
SetParent(this.Handle, hWndParent);
SetWindowLong(this.Handle, -16, new IntPtr(GetWindowLong(this.Handle, -16) | 0x40000000));Here's how it looks when the form is in the desktop Thank you
If you are trying to create a desktop widget then do some research with the Sidebar Gadget projects. The way you are doing it could be problematic.
Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my Blog