[DllImport("kernel32.dll")] static extern IntPtr GetConsoleWindow(); [DllImport("user32.dll")] static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); const int SW_HIDE = 0; const int SW_SHOW = 5; [DllImport("user32.dll")] //Get Idle Time tagLASTINPUTINFO LastInput = new tagLASTINPUTINFO(); LastInput.cbSize = (uint)Marshal.SizeOf(LastInput); LastInput.dwTime = 0; if (GetLastInputInfo(ref LastInput)) { tmpcnt = IdleTime; IdleTime = System.Environment.TickCount - LastInput.dwTime; }
user32.dll
GetLastInpitInfo
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)