Peter Below's Threaded Splash Screen and Modal Dialogs

前端 未结 3 524
说谎
说谎 2021-02-06 19:45

I\'m using Peter Below\'s PBThreadedSplashForm to display during application startup. It gets updated as various databases are opened during the creation of the data module (jus

3条回答
  •  半阙折子戏
    2021-02-06 20:39

    You should be able to fix this by parenting the dialog to the splash screen. Assign the splash screen's HWND to a global variable, and override the dialog's CreateParams method. If the global HWND has a value assign it to the Params.WndParent variable that CreateParams passes in. The fact that they're from different threads shouldn't matter, since it's just dealing with the HWND, not a VCL object, and Windows will handle the synchronization.

提交回复
热议问题