Archive for the 'System' Category

16 Jan

Drawing text on desktop

Using this simple trick, you can write any text right on Windows desktop. You can choose text color, transparency, position…

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
06 Jan

Own items in application system menu

When you rightclick application title bar (or leftclick icon on title bar), the system menu will appear. Here are common commands to close, minimize or maximize window. But you can add your own commands if you like. Here is how.

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
06 Jan

Right justify a main menu item

If you use standard main menu component, all items are usually on the left side of the window and there is not much you can do about it using Object Inspector. Here is a little trick to move one main menu item on the right side while the rest remains on the left side. It’s [...]

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
01 Jan

CRC32 (Cyclic Redundency Check)

One of the most effective method to check if the file is ok is to calculate CRC32 checksum and compare it with previously saved value. Using CRC check, you can also compare two files, verify downloaded files etc…

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
31 Dec

Shortened version of a filename

The length of whole path and file name could be too long to show it in title bar of application or some label. Solution? Show shortened version of a filename using dots instead of folders.

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
26 Nov

How to locate important system directories

Using ShlObj unit and SHGetSpecialFolderLocation Windows API function, we can retrieve the location of a special folders, such as My computer, Desktop, Program Files etc… There are over 20 special folder locations.

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
11 Nov

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.

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
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.

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
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.

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb
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.

  • Digg
  • del.icio.us
  • Facebook
  • Technorati
  • Google
  • Live
  • YahooMyWeb