views:

113

answers:

3

Hi,

I used to see that a program could embed a calendar right into the desktop, and the calendar is interactive, all 'show desktop' operations including will not hide it.

I wonder how I can achieve that? Thank you.

A: 

When specifying a background you have a choice of specifying an HTML file as a background. May be the software that you are using is actually just showing an HTML page with the calendar inside it.

You can specify an HTML page by clicking on Browse in the Backgrounds tab in Desktop properties.

Trainee4Life
Thank you Trainee4Life, the calendar program program does not change the desktop. Maybe it uses some hooking tricks?
Edwin
A: 

A regular window using a variation of the old "Always on Top" trick to be always on top of the desktop? That's what I'd do, at least.

Kawa
an 'always on top' window does not work like the real desktop window, you know the user experience is very important.
Edwin
Well Edwin, if you (right?) click on the calendar on your desktop, do you expect to get the desktop's menu or the calendar's? Incidentally, when I said "variation on Always on Top" I meant (in this case) using the Desktop's hWnd instead of HWND_TOPMOST.
Kawa
A: 

use the following code and pass the window handle to the function while form load hope fully this resolves your problem

public void SetFormOnDesktop(IntPtr hwnd) {    
IntPtr hwndf = hwnd;  
IntPtr hwndParent = FindWindow("ProgMan", null);  
SetParent(hwndf, hwndParent);  
}
JKS
thanks, with the api calls in the code snippets you provide, I found the this more detailed post: http://stackoverflow.com/questions/365094/window-on-desktop
Edwin