[DllImport("user32.dll")]
static extern bool GetInputState();
None.
None.
Please add some!
This function can greatly boost the performance of any application. When calling Application.DoEvents() to make the UI responsive, it generally decreases application performance. With this function, we make sure there is at least one event (keyboard or mouse) that needs to be processed before calling Application.DoEvents(). (VB2TheMax.com : Francesco Balena)
public bool CheckEvents()
{
if ( !GetInputState() )
return false;
else
{
Application.DoEvents();
return true;
}
}
Do you know one? Please contribute it!