static extern bool IsWindowActive (IntPtr windowHnd); [DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]