Archive for the 'System' Category

16 Oct

Directory structure with associated icons and file info in ListView

Using ShellAPI unit and few lines of code, we can load directory structure into ListView and show associated icons and information for each file.

30 Sep

Implementation of Delay procedure

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, but sometimes (maybe) the Dealy procedure may be useful. Here is a simple implementation of Delay procedure using Delphi.

22 Sep

Online / offline status detection

There are few methods to check if computer is online (=connected) or offline (=disconnected). This one is really simple.

26 Aug

Taskbar position

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 to the left, rigtht or top of the screen. Here is the method to determine actual position.

22 Aug

Just one instance of application

If want to allow users to run just one instance of application, one of possible methods is to use “mutext” (mutual exclusion).

18 Aug

Retrieve time since the system was started

This tip is very simple. Just use standard function GetTickCount and the rest is just elementary mathematics.

18 Aug

Determine CPU frequency

Here is just small piece of assembler code to determine CPU frequency in MHz.

18 Aug

Hide /show taskbar clock

Simple function to show and hide taskbar clock.

18 Aug

Simulate mouse moves and clicks

You can move mouse cursor and simulate clicking programmatically using just one simple procedure.

18 Aug

Hide / show all icons on desktop

Another “one-line code trick” and probably completely useless.