11 Temmuz 2011 Pazartesi

C# DialogResult ve MessageBox Kullanımı

DialogResult Olay = MessageBox.Show("Bu satır silinecek","Onaylama",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Exclamation);
if (DialogResult.Yes == Olay)
 MessageBox.Show("Yes düğmesi tıklandı");
if (DialogResult.No == Olay)
 MessageBox.Show("No düğmesi tıklandı");
if (DialogResult.Cancel == Olay)
 MessageBox.Show("Cancel düğmesi tıklandı");
 DialogResult Onay = MessageBox.Show("düğme tıkla","deneme",MessageBoxButtons.AbortRetryIgnore);
if (DialogResult.Abort == Onay)
 MessageBox.Show("Abort düğmesi tıklandı");
if (DialogResult.Ignore == Onay)
 MessageBox.Show("Ignore tuşu tıklandı");
if (DialogResult.Retry == Onay)
 MessageBox.Show("Retry düğmesi tıklandı");

0 yorum:

Yorum Gönder