Show a loading screen in vb.net

前端 未结 3 1548
执念已碎
执念已碎 2021-02-10 15:30

I need to show a screen or something, saying \'Loading\' or whatever while long process are working.

I am creating a application with the Windows Media Encoder SDK and i

3条回答
  •  星月不相逢
    2021-02-10 16:03

    There are many ways you could do this. The most simple might be to show a modal dialog, then kick off the other process, once it is completed you an then close the displayed dialog. You will need to handle the display of the standard X to close though. However, doing that all in the standard UI thread would lock the UI until the operation is complete.

    Another option might be to have a "loading" screen that fills your default form, bring it to the front, then trigger the long running process on a secondary thread, once it is completed you can notify the UI thread and remove the loading screen.

    Those are just a few ideas, and it really depends on what you are doing.

提交回复
热议问题