Beispiel #1
0
        private void btnExam3_Click(object sender, EventArgs e)
        {
            AsynDelagateTest my          = AsynMethod;
            IAsyncResult     asyncResult = my.BeginInvoke(15000, null, null);

            while (!asyncResult.AsyncWaitHandle.WaitOne(100, false))
            {
                Thread.Sleep(1000);
                UIThreadSafe(textBox1, delegate
                {
                    textBox1.Text += "*";
                });
            }
        }
Beispiel #2
0
 private void btnExam4_Click(object sender, EventArgs e)
 {
     AsynDelagateTest my          = AsynMethod;
     IAsyncResult     asyncResult = my.BeginInvoke(15000, AsynMethodCompleted, my);
 }