Sunday, August 30, 2009

Posting Code in Blogger

This posting is off topic too, but I have finally found some good instructions on posting code samples on Blogger. See this post for details:

Thursday, August 27, 2009

Restarting IIS from the Command-Line

This posting is a little off topic, but I always forget the command-line command to restart IIS. It is simply: iisreset

Here is more info at:

Tuesday, August 4, 2009

How to tell in VB.NET or C# if the Ctrl or Shift Key are being pressed

Sometimes you may need to know if the Ctrl or Shift key is being pressed by checking its state instead of using a key event. Also, most solutions to this problem involve some pinvoking and the win32api GetKeyState, but it turns out to be very simple as this posting describes:

Here is the gist:

if (Control.ModifierKeys == Keys.Control)