private void OnLostFocus(object sender, EventArgs e) { if(ReEnter) { ReEnter = false; return; } if(!IsValidData()) { MsgBox M = new MsgBox(); M.ShowDialog(); if(M.DialogResult = DialogResult.OK) { ReEnter = true; textBox1.Focus(); } } }
IsValidData()
if(M.DialogResult == DialogResult.OK)
System.Windows.Forms.MessageBox
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)