Making a splash screen

前端 未结 6 1196
无人及你
无人及你 2021-01-06 06:29

The concept of a splash screen doesn\'t strike me as something that should be so complicated, but I\'m having trouble getting the whole splash screen painted.

Let\'s

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-06 07:13

    You are displaying the splash screen and checking your database on the same thread. The thread can only do one thing at a time.

    A quick and cheap way to fix this is to have loadAndCheckDatabase() call Application.DoEvents() periodically. However that's a cheap fix.

    You really want to run loadAndCheckDatabase() on its own thread, a BackgroundWorker is a nice simple way to do this.

提交回复
热议问题