c# Delay fonksiyonu - c# bekletme (not sleep)




C# uygulamanızda sleep komutunu kullanarak donma sorunu yaşıyorsanız, aşağıdaki yöntem işinize yarayabilir.


 private void txtoid_TextChanged(object sender, EventArgs e)
        {
         MessageBox.Show("BEKLEME BAŞLIYOR");
         bekle(5);  //Bu süreçte donma yok.
         MessageBox.Show("BEKLEME BİTTİ");

        }
void bekle(int saniye)
        {
            saniye = ((saniye + Convert.ToInt32(DateTime.Now.Second)) % 60);
            for (;;)
            {
                if (saniye == DateTime.Now.Second) break;
            }
        }

Yorumlar

Unknown dedi ki…
Did you know there's a 12 word phrase you can communicate to your man... that will induce deep feelings of love and instinctual attraction for you deep within his heart?

Because hidden in these 12 words is a "secret signal" that triggers a man's impulse to love, treasure and look after you with his entire heart...

12 Words Who Fuel A Man's Love Impulse

This impulse is so built-in to a man's genetics that it will drive him to work better than ever before to make your relationship as strong as it can be.

As a matter of fact, triggering this influential impulse is so important to achieving the best possible relationship with your man that once you send your man one of the "Secret Signals"...

...You will soon find him expose his heart and mind for you in a way he never expressed before and he'll identify you as the only woman in the universe who has ever truly appealed to him.

Bu blogdaki popüler yayınlar

C# formun açık olup olmadığını denetlemek