In my winform application I have a textbox that should only开发者_如何学运维 take a predefined local server address and throws an message box in the else case as soon as the focus changes from that textbox
See the Validating event. This event will fire when the control should be validated, which by default happens when the control loses focus.
精彩评论