public static object GetProcessIDForegroundWindow(params object[] ps) { int id = -1; Meths.GetWindowThreadProcessId(Meths.GetForegroundWindow(), ref id); return(id); }
public static object DesktopIsActive(params object[] ps) { const int maxChars = 256; IntPtr handle = IntPtr.Zero; StringBuilder className = new StringBuilder(maxChars); handle = Meths.GetForegroundWindow(); if (Meths.GetClassName(handle, className, maxChars) > 0) { string cName = className.ToString(); if (cName == "Progman" || cName == "WorkerW") { return(true); } else { return(false); } } return(false); }
public static object GetForegroundWindow(params object[] ps) { return(Meths.GetForegroundWindow()); }