How can i show the desktop with API. Thanks
Cool question. MSDN doesn't provide any answers. SO.... I right clicked my SHOW DESKTOP icon, and sent it to Quick Editor. Here's what's inside:
Not much, huh? It's inside a file named "Show Desktop.SCF" down somwwhere inside your windows directory. Then I tried something simple. I re-saved that file in a different directory under the name "clear.SCF" Wow, up poped an icon, same as in my quick launch tray, with NO file extension. Even better, when I double clicked that file, POOF, a clear desktop appeared. So, just create a file, same stuff inside, any name, SCF extension, then ShellExecute it open. You may try shelling the file explorer (which IS explorer.exe) with "Command=ToggleDesktop" on the command line, somehow something like this should work. This message was edited by Ernie, on 3/13/2001 10:37:35 PM
Command=2 IconFile=explorer.exe,3 Command=ToggleDesktop
Have a look at the following API call, it will display the desktop in the window size you require, its designed to work full screen. PaintDesktop Regards, firstname.lastname@example.org
Try something like (I wouldn't have a clue if this will work?)
.data mData DWORD BSF_POSTMESSAGE .code invoke BroardCastSystemMessage ,BSF_POSTMESSAGE,ADDR mData,WM_SHOWWINDOW,FALSE,SW_OTHERZOOM
invoke GetDesktopWindow invoke ShowWindow ,eax,SW_SHOW
I find the API SwitchDesktop, however to use it i have to enumerate the Desktops... and in order to do that i have to enumerate the WindowStations. I don't think this is API that i should be using...
Ernie, I think this one went way passed me. I don't know what you mean by you clicked on your SHOW DESKTOP Icon, sence you posted that I spent over an hour looking for such an Icon. I gave that hunt up, and was now wondering what OS are you running? and am I that far behind? I have all the MS OS's but I run in 98 cuz Thats where the Audiance is. I mean, most people are running 95/98 so I know my programs will run in that. I have win200 server, win2000 plain OS and have problems with my programs I write, running in those two OS's so I stick to win98, I have not gone out and got the new ME YET, but was wondering if I did, would this be a BIG loss of funds as it was with the two win2000 OS's I have lost already? anyway, where is this Icon? not that I really need to know, it is just bugging me now.....
Hi, you can see the button Show Desktop marked on the snapshot that is linked here. I am running Windows 98 SE German (the language should not play a role) and, as you see, this button is in the Quickstart Group. It is also located in several dialog boxes such as Save as.... If you don't have this button located in your Quickstart you can create it (I think) by searching for *.scf and choosing the one with desktop. Clicking this button will cause EVERY window to minimize and show the desktop! HTH Stefan This message was edited by Stefan Krause, on 4/21/2001 12:28:40 PM
thanks, that did help. I found it. I see that it is in here, but this version of win98 did not place it on the desktop when I installed it. So this makes me wonder why MS thought there should be alot of versions and why some should show this or that while others should not?????? Go figure......