How to change the MSN password

Few days ago I thought I could change my MSN password due to security reasons. ( … it was a old password and I never changed it before … ). But it turned out that this should be not as easy as it seems. I did not found any link or button that allows me to change my password.

After a while a found the link, and sure I don’t want to hold back that link: https://accountservices.passport.net

This entry is also especially for me, because I think I’m going to forget the link until I need it again.

Enhanced: Drag and move WinForms (without having a titlebar)

Yesterday my colleague Alexander Jung read the articel I posted yesterday about dragging WinForms. And he showed me a solution for dragging windows that is much smarter than the solution I posted.

So I don’t want to keep back that solution.

Instead of implementing a drag routine for the WinForm, we can fool the system so that Windows thinks that the hole WinForm is a Caption (TitleBar). This can be done by intercepting the Windows Message WM_NCHITTEST and returning HTCAPTION if the user tries to drag the window.

private const int WM_NCHITTEST = 0x84;
private const int HTCLIENT = 0x1;
private const int HTCAPTION = 0x2;

///
/// Handling the window messages
///
protected override void WndProc(ref Message message)
{
    base.WndProc(ref message);

    if (message.Msg == WM_NCHITTEST && (int)message.Result == HTCLIENT)
        message.Result = (IntPtr)HTCAPTION;
}

The example solution can be downloaded using the following link.
Enhanced: Drag and move WinForms (without having a titlebar)

MD5 Hash Keys with C#

Did you ever try to compute a md5 hash key with C# .NET? No? Lucky guy.

When you think of PHP there’s one command called md5(). When you think of C#, you need an MD5CryptoServiceProvider, Streams and other things like byte arrays that holds the computed hash code and so on.

You see – that’s a job for a helper class. I called it the Md5CryptHelper class. The goal was to offer a simple method like md5() known from PHP.

So here it is:

const string KEY = "MoonWalk";

string keyHash = Md5CryptHelper.ComputeHash(KEY);
Console.WriteLine(KEY + " Hash: " + keyHash);

If you’re interessted you can download the source code using the following link:
Download the source code of md5 Hash Keys with C#.