using SSQ_BLL; using System.Threading; namespace SkySea_QQ_0 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } bool isRec = true; string recTxt = ""; Thread T; private void bt_connection_Click(object sender, EventArgs e) { MyBLL.getConn(txt_ip.Text ,txt_port .Text); MyBLL mybll = new MyBLL(); T = new Thread(mybll.receiveMessage); T.Start(); while (isRec) { recTxt = mybll.receiveMessage(); txt_receive.AppendText(recTxt + "\r\n"); } bt_connection.Enabled = false; } } }
在练习着用三层写一个小东西,在表示层开一个子线程,调用业务逻辑层自己写的一个SSQ_BLL.dll里写的一个方法,先MyBLL mybll = new MyBLL();在表示层写线程调用 T = new Thread(mybll.receiveMessage);时,mybll.receiveMessage这样写出现错误,怎样在子线程里调用引入的DLL里得方法????请指教!
慕仙森