I have simple Windows form (not WEB app), a test app for this problem. It has a masked Edit and a button. mask is "00000000" (8 zeroes) and prompt char is a space, because I don't want a prompt char. In button click event, I set the focus to the text box because in my real app depending on what the user enters, I do not close my dialog and instead force them to reenter data. I can click the button all day and all is fine - textbox get focus. However, if I use the mouse to click in the text box, I get 8 space (size of the mask) inserted into the text box. Why? I don't get it?? See image. I can tell this happens by seeing the blinking cursor.