I saw this C++ code on a forum which minimizes all open windows
#define MIN_ALL 419
#define MIN_ALL_UNDO 416
int main(int argc, char* argv[])
{
HWND lHwnd = FindWindow("Shell_TrayWnd",NULL);
SendMessage(lHwnd,WM_COMMAND,MIN_ALL,0);
Sleep(2000);
SendMessage(lHwnd,WM_COMMAND,MIN_ALL_UNDO,0);
return 0;
}
How can I access the FindWindow and SendMessage API function and the HWND type in C#.net?
See Question&Answers more detail:os