ZengCode.Com (The Thai Php Framework)  


Home   Download   Manual   About us  

MAIN MENU
News
Php Tips
Android Programming
Design Pattern By PHP
C# using Linq น่าใช้จริงๆ
C# Tips & Technique
C# Design Pattern
Linux Quick Tips
Java & JavaScript Tips
Database
ZengCode Framework Guide
Zeng Code Code
Programming
IPhone (Tips and Trick)
     จะควบคุม Windows Control ใน Thread ได้อย่างไร   (2010-02-04)

ตามตัวอย่างเลยนะครับ ไม่ยากมากเข้าใจง่ายครับ

delegate void SetTextCallback(string text);

        private void setText(String text)
        {
            if (this.textBox1.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(setText);
                this.Invoke(d, new object[] { text });
            }
            else
            {
                this.textBox1.Text = text;
            }

        }

        private void Run2()
        {
            int i = 0;
            while (i <= 100)
            {
                this.setText("Number ==> "+i);
                i++;
                Thread.Sleep(2000);
            }
        }


Comment
Name
Comment
Security CodeCAPTCHA Image

easy tracking
avis car rental discount code

This page took 0.493557 seconds to load.