How to detect system idle time
If you want to detect user inactivity even if your application is in background (has no focus), it’s really simple. You can achieve this using GetLastInputInfo function.
If you want to detect user inactivity even if your application is in background (has no focus), it’s really simple. You can achieve this using GetLastInputInfo function.
Using ShellAPI unit and few lines of code, we can load directory structure into ListView and show associated icons and information for each file.
Do you remember Delay procedure from Turbo (Borland) Pascal? It was used to pause the program “flow” for specific time interval. In Windows, there is a different style of programming,… Read more »
There are few methods to check if computer is online (=connected) or offline (=disconnected). This one is really simple.
Using Winsock unit, we can determine computer IP address. If you have more network adapters, all IP addresses will be detected.
For some applications, it’s important to know, where the taskbar is located. Of course, most users use standard “bottom of the screen” position, but of course, you can place it… Read more »
If want to allow users to run just one instance of application, one of possible methods is to use “mutext” (mutual exclusion).
This tip is very simple. Just use standard function GetTickCount and the rest is just elementary mathematics.
Here is just small piece of assembler code to determine CPU frequency in MHz.
Simple function to show and hide taskbar clock.