Monthly Archives: May 2010

Text block clock

Clock

This is a clock that tells you the time by highlighting text in a block of text. In this case using a C# Console App. Not exactly original, but I thought I’d give it a try.
The progress bar counts the time until the next 5 minute mark.

Download Code
Download Executable
(more…)

Maximizing a print preview dialog in c#

Here is a way to get a print preview dialog (or perhaps any resizeable dialog) to be maximized when opened.

The dialog may be cast to a Form allowing WindowState to be set.
For example:

PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = doc;
((Form)dlg).WindowState = FormWindowState.Maximized;
dlg.ShowDialog();