Change your screen resolution from the command line

Today I’ve made a little program to quickly change the screen resolution from the command line. It’s written in C++, and can be downloaded from here. The source code looks like this:

Changing the resolution is done using the Win32 API ChangeDisplaySettings. After setting the resolution, running applications need to be notified which is done by calling SendMessage. The rest is pretty straightforward.

Countdown clock in Excel

My work buddy Jurre is drastically changing his career path for the better by relocating to Ireland this week. To help him keep track of the time he has left in his current job I made him a countdown clock in Excel. It shows the number of days, hours, minutes and seconds left both in separate cellsĀ of a sheet and in the titlebar of the Excel window. It demonstrates the use of the scarcely documented Excel function DATEDIF and the Application.OnTimeĀ method to update the clock at one second intervals. The workbook you can download here counts down to the new year 2010, but you can easily change the date and time it counts down to.