Author Archives: CooLMinE

Create and extract .zip files in C#

Sadly there aren’t many flexible or efficient ways to create .zip files in .NET prior to .NET 4.5. Thankfully some people took the initiative and created some very easy to use libraries for creating/extracting and updating .zip files. My two all time favourite are DotNetZip and SharpZipLib.

For this example I will be using the DotNetZip library.

First you will need to download the library (.dll) either from or from The file should contain quite a few libraries, so choose the one that suits your needs the most and add it as a reference in your project.

Limit the number of months displayed by WordPress archives widget

Locate and edit your themes functions.php file. This can either be done in the admin panel by navigating to

Appearance -> Editor -> Click on functions.php file

or by directly editing the file which you can usually find under

wp-content/themes/<theme name>/functions.php

After opening the file simply add the following lines in it.

Replace the number 10 with the number of months that you want to display and you are done!

How to register a global hotkey for your application in C#

If you are looking for a way to set a global hotkey for your C# application that can be used without your form having focus I have created a decently commentated example for you below that you can use.

How to know if a process has stopped or started using events in C#

There are numerous of ways to detect if a new process has started or stopped, sadly the majority of them are extremely inefficient as it requires you to keep looping through the active process constantly to see if a new one appeared in the array or if one is not there any more.

Luckily the windows Win32_ProcessStartTrace and Win32_ProcessStopTrace classes are here to help out.

The first thing we need to do is reference System.Management.dll in our project. Then we need to define the scope in your class which we will be using.

After that we need to initialise the class which will contain the process start and process stopped events and add the handlers and their methods.

Add the two following variables in your Class.

In your constructor the event handlers need to be added.

and then their event methods that will be trigged when a process either starts or stops.

And finally we need to start the events by using

Unigine releases Heaven 4.0 benchmark

Unigine has released a new version of Heaven, a DirectX 11 graphics benchmark.

The new version offers a number of new features such as:

  • Extreme hardware stability testing
  • Accurate results due to 100% GPU-bound benchmarking
  • Benchmarking presets for convenient comparison of results
  • Support for DirectX 9, DirectX 11 and OpenGL 4.0
  • Multi-Platform support for Windows, Linux and Mac OS X
  • Comprehensive use of hardware tessellation, with adjustable settings
  • Dynamic sky with volumetric clouds and tweakable day-night cycle
  • Real-time global illumination and screen-space ambient occlusion
  • Cinematic and interactive fly/walk-through camera modes
  • Support for multi-monitor configurations
  • Various stereo 3D modes
  • GPU temperature and clock monitoring
  • Command line automation support
  • Highly customizable reports in CSV format
  • Support for software rendering mode in DirectX 11 for reference purposes
  • Support for English, Russian and Chinese languages

System Requirements

  • ATI Radeon HD 4xxx and higher, NVIDIA GeForce 8xxx and higher, or Intel HD 3000 and higher
  • Video memory: 512 Mb
  • Disk space: 1 Gb
  • Microsoft Windows XP / Vista / 7 / 8, Linux (proprietary video drivers required), or Mac OS X 10.8+ (Mountain Lion)

There are three versions currently available .