>>how to shut down window in the program ?
>>can I make a batch file to close the window ?
>
>As Nick points out, your question is not clear. If you mean to close the windows of another application, you can use send a WM_CLOSE (or WM_QUIT, depending on whether you believe me or Rauh. :-) Both work.) message to the window using PostMessage(). There are probably samples in the downloads section.
Don't you need the exit code with WM_QUIT (and WM_QUERYENDSESSION)? AFAIK, WM_CLOSE (and WM_DESTROY) don't require it.
George
Ubi caritas et amor, deus ibi est