private bool KillScreensaverFunc(IntPtr wnd, IntPtr param) { if (NativeMethods.IsWindowVisible(wnd)) { NativeMethods.PostMessage(wnd, WmClose, 0, 0); } return true; }