Easiest way? Don't replace it yourself! If you set the TextBox.UseSystemPassword property to true, it will do it for you. Or, if you must use "*" characters, then leave UseSystemPassword at false, as set TextBox.Password Char to '*' and it will use that instead.
If you really, really, must do it yourself, then I think what you really want to do is just add the line:
txtPassword.Focus();
to your method above.