How does one access a control from a static method?

前端 未结 10 1947
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 12:50

I have an application in C# .NET which has a MainForm and a few classes.

One of these classes receives incoming data messages from a network. I need to

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 13:35

    I think you might be taking the wrong approach on this. It sounds like you are trying to push messages to a client from an external process. There are ways to do this, but it will get complicated. My suggestion would be to have the client poll whatever process has the data periodically - maybe every 10 seconds depending on your needs. This is going to be a heck of a lot easier than pushing from server to client.

提交回复
热议问题