开发者

Create a Visual Studio 2010-like splash screen

I was intending to create a splash screen like the one sported by Visual Studio 2010 for my desktop application (feel free to use any version of C#/VB.NET/CLR).

Create a Visual Studio 2010-like splash screen

(source: msdn.com)

As per the Visual Studio blogs, the splash screen was not developed using WPF since it would involve the CLR and WPF libraries to load causing a substantial delay in application loading. Hence, they reverted to C++ and Win32 stack to do that same for performance reasons.

Is there a feasible option available for Windows Forms or WPF developer to leverage the sam开发者_运维问答e branding? The idea is to have similar rich branding in a splash screen without loosing performance and start-up time.

Using PNGs and transparency effects does not help on Windows Forms (a known issue, and I have read related questions on this site for that). Just to emphasise: it's a splash screen, so start-up time can't be compromised.


Have a look at Transparent Splash Screen. Or C# Splash Screen.


The guys that wrote it actually did a post on it, Behind the Scenes: The Splash Screen (2009-11-10)...


I had to do something similar with a patcher for an massively multiplayer online game (MMO), and we like pretty splash screens in games. I made a custom ONLOAD event (instead of OnShown or Load event that both present a few inconveniences in this case) and put my code for displaying the pretty picture there:

protected override void OnLoad(EventArgs args)
{
    base.OnLoad(args);
    Application.Idle += new EventHandler(OnLoaded);
}

private void OnLoaded(object sender,
                      EventArgs args)
{
    Application.Idle -= new EventHandler(OnLoaded);

    // TODO: Add relevant code here
}

As for the picture, surely is there a way for displaying PNG files using native behavior (for partial transparency like in the Visual Studio splash screen).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜