How to display message box without any buttons in C#

前端 未结 4 1508
死守一世寂寞
死守一世寂寞 2021-01-13 08:15

I try to show a MESSAGE to the user while an operation is executed. The MESSAGE won\'t show any button. Just a MESSAGE (text) and maybe a background image.

The probl

4条回答
  •  清歌不尽
    2021-01-13 08:45

    One way you could do it is create a worker class that raises an event when it is finished.

    execute the worker class in a new thead so it runs it the backgroud.

    create the modal form with a method to close it as the event handler for the "finished" event. This way the ui still works and responds and the form will close once the worker thread is finished.

提交回复
热议问题