TTGroup
TTGroup

Reputation: 3703

How to change splash screen size?

I'm using WPF on C#, I added a *.png image and configure it as a splash screen.

This png file has resolution is 1100x800 pixels, The problem is my application will support many resolution of screens.

So this splash screen with this size will so large for small screen (as 1366x768 screens).

If I scale down size of splash screen, this make it too small for the large screens (as 1920x1080 screens).

So I want to change size of splash screen dynamically for each monitor screen.

Is there any way to do it?

Upvotes: 4

Views: 5136

Answers (2)

Gusdor
Gusdor

Reputation: 14334

You cannot. The splash screen is embedded inside the manifest and is shown by .net before any of your code is loaded.

You will need to create a custom window and display it manually. However, any static references will be loaded already - you will still get a delay. This subverts the whole point of having a splash screen.

Consider just choosing the smallest image you will ever need.

Upvotes: 5

Bas
Bas

Reputation: 27105

You cannot do this using a PNG, it will always render a fixed size. You should create a custom splash screen. This CodeProject article has a nice tutorial on how to do it.

Upvotes: 3

Related Questions