The way I usually do these things is that I create a form, and add a property to it that would contain the result.
Now, I present the message box as follows:
DialogResult result = frmQuestion.ShowDialog()
if(result == DialogResult.OK)
{
string uname = frmQuestion.UserName;
string pwd = frmQuestion.Password;
}
Of course, since its a full fledged form, you can do some pretty nifty things with it.
If you don't want to lock up the application (non-modal form) then use Show() rather than ShowDialog()