public static bool AnyInputMessage(uint qsFlags) { // the high-order word of the return value indicates the types of messages currently in the queue, // including already observed but not retrieved messages; // beware of the undoc QS_EVENT, it may always be returning non-zero uint status = WinApi.GetQueueStatus(qsFlags); return((status >> 16) != 0); }