Click here to Skip to main content
15,844,498 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I am trying to implment a splash screen in the easiest way possible(at the minute) using the splash screen build option. However I keep getting the error:

"The calling thread must be STA, because many UI components require this"

I have absolutly no idea what this means! If someone could enlighten me it would be appreciated.


It means that the threading model of the app is incompatible with the component you're using. The easiest fix is to create your own form to show the splash, or write a Win32 app that shows it and launches your main app. We do the latter, b/c WPF is slow to start and the splash took a while to appear, otherwise.
Share this answer
DanHodgson88 27-Jul-11 7:55am    
Cheers for that Christian, I havn't quite got the knowledge to write my own Win32 app but I will deffinetly look into it!
If the splash screen is called from the main thread you need to mark it as STAThread.
Read more about STA here[^].
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900