要实现的效果是这样的Form上有一个textbox和一个listbox,在text上输入拼音,然后程序自动在一个文件里该拼音对应的条目,在listbox里显示出来。  在PC机上很容易实现,由于查询的文件比较大,在嵌入式平板上用PC机的方法做很慢很慢,会出现界面"假死"的现象,用户体验很差。所以考虑用异步委托调用的方法。我在PC机上做好了程序,在CE里直接报”.NET Compact Framework 不支持异步调用委托。“  不知道有没有别的方法达到这种效果。
 我把我的代码也贴出来,大家提点意见。
 public delegate void SearchDelegate(string drug, string pystr);
        private void SearchForInfo(string txtpath, string pystr)
        {
                 //这里是查找代码,Info是查询结果
                    UpdateListBox(listBox1, Info);
                               
                   }
        private void tB_text_TextChanged(object sender, EventArgs e)
        {
            listBox1.Visible = true;
            listBox1.Items.Clear();
            
            string text = null;
            text = tB_text.Text.Trim().ToUpper();
            
            SearchDelegate sfi = new SearchDelegate(SearchForInfo);            IAsyncResult async = sfi.BeginInvoke("txtpath", text, new AsyncCallback(CompleteMethod), "信息来自于主线程");        }
        private static void CompleteMethod(IAsyncResult async)
        {
            //AsyncResult ar = (AsyncResult)async;            //SearchDelegate del = (SearchDelegate)ar.AsyncDelegate;
            ////int result = del.EndInvoke(async);            //string mainTheadMsg = ar.AsyncState as string;
            //// Console.WriteLine("{0}, Result is: {1}", mainTheadMsg/*, result*/);
        }        private object m_SyncObjectForListBox = new object();
        private delegate void SetTextCallback(ListBox control, string text);
        private void UpdateListBox(ListBox control, string text)
        {
            if (control.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(UpdateListBox);
                this.Invoke(d, new object[] { control, text });
            }
            else
            {
                lock (m_SyncObjectForListBox)
                {
                    control.Items.Add(text);
                }
            }
        }