BCB获取键盘、鼠标空闲时间
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
TLastInputInfo t;
t.cbSize = sizeof( TLastInputInfo );
GetLastInputInfo( &t );
Label2->Caption = IntToStr( GetTickCount() - t.dwTime );
}
{
TLastInputInfo t;
t.cbSize = sizeof( TLastInputInfo );
GetLastInputInfo( &t );
Label2->Caption = IntToStr( GetTickCount() - t.dwTime );
}