Exemplo n.º 1
0
 //定义委托变量
 public int getControlHandle()
 {
     if (this.InvokeRequired) {
         GetHandle_delegate d = new GetHandle_delegate(GetHandle_direct);
         return (int)this.Invoke(d);
     } else {
         return GetHandle_direct();
     }
 }
Exemplo n.º 2
0
        private delegate int GetHandle_delegate(); //定义委托变量

        public int getControlHandle()
        {
            if (this.InvokeRequired)
            {
                GetHandle_delegate d = new GetHandle_delegate(GetHandle_direct);
                return((int)this.Invoke(d));
            }
            else
            {
                return(GetHandle_direct());
            }
        }