AceBomBom
شنبه 04 آبان 1392, 02:11 صبح
وقتی text box مربوطه رو خالی میدم ولی بازم بقیه برنامه اجرا میشه
لطفا راهنماییم کنید :قلب:
public static void ms(string s)
{
if (s == "")
{
MessageBox.Show("خالی است");
return ;
}
}
private void CodeOz_textBox_KeyDown(object sender, KeyEventArgs e)
{
Int32 i;
if (e.KeyCode == Keys.Enter)
{
ms(this.CodeOz_textBox.Text);
i = Convert.ToInt32(this.CodeOz_textBox.Text);
try
{
// Code
}
catch (Exception ex)
{
Public_Class.Error_Message(ex.ToString());
}
}
}
لطفا راهنماییم کنید :قلب:
public static void ms(string s)
{
if (s == "")
{
MessageBox.Show("خالی است");
return ;
}
}
private void CodeOz_textBox_KeyDown(object sender, KeyEventArgs e)
{
Int32 i;
if (e.KeyCode == Keys.Enter)
{
ms(this.CodeOz_textBox.Text);
i = Convert.ToInt32(this.CodeOz_textBox.Text);
try
{
// Code
}
catch (Exception ex)
{
Public_Class.Error_Message(ex.ToString());
}
}
}