开发者

how to display data comming from pipe on GUI form in C #

开发者 https://www.devze.com 2022-12-09 05:45 出处:网络
I have made a small server and client application connected via named pipe. I am able to communicate between them in console application. Now i want that data to be displayed in text box on form.

I have made a small server and client application connected via named pipe. I am able to communicate between them in console application. Now i want that data to be displayed in text box on form.

I am not able to display, once i assign the data it gets assigned but text box is not showing the new up dated value.

Can any one help me t开发者_开发知识库o resolve this ?


Could you show us some code ? It would probably help.

Taking a wild guess based on the information you have already provided, perhaps you are continously polling for data on the GUI thread ? That would effectively block the thread, so that the GUI never gets around to redrawing the text box.


Try to add the following code after you set the new value for the textbox :

   textBox1.AppendText(yourData); // let's say, you add your data here
   textBox1.Update();
   Application.DoEvents();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号