Click here to Skip to main content
15,884,472 members
Articles / Programming Languages / Visual Basic
Article

Transparent Splash Screen

Rate me:
Please Sign up or sign in to vote.
4.86/5 (26 votes)
13 Jan 2006CPOL 350.7K   17.3K   134   71
Creating a transparent Splash Screen - like the one used by Adobe.

Introduction

Anyone interested in making a transparent splash screen? Like the one used by Adobe? This one was done by rendering PNG files that use Alpha. Inluded in the download, you will find a full example using Visual Basic .NET 2003. I'm using embedded resources for the image... I have installed and run this project correctly on Windows 98, XP, 2000.

Here are the two most important functions to use inside your splash screen form:

VB
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
    ' Do nothing here!
End Sub

Protected Overrides Sub OnPaintBackground(
    ByVal pevent As System.Windows.Forms.PaintEventArgs)
    Dim gfx As dra.Graphics = pevent.Graphics
    gfx.DrawImage(IMA.imaSplashScreen, New dra.Rectangle(0, 0, Me.Width, Me.Height))
End Sub

P.S. This is a very easy way to accomplish this, without using API calls and such messy stuff like that. You should be able to make splash screens and About boxes like the one I have used in my project.

WaterScript.jpg

License

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


Written By
Web Developer
United States United States
Just another programmer trying to figure it all out. Big Grin | :-D





MCP, MCSD & MCAD

Comments and Discussions

 
GeneralVery nice, but Almost it would seem Pin
tkiykioglu3-Jul-06 13:38
tkiykioglu3-Jul-06 13:38 
GeneralRe: Very nice, but Almost it would seem Pin
DameonBlack24-Jan-07 11:43
DameonBlack24-Jan-07 11:43 
Hi,

This is standard behavior for this splash screen.

Because it's a splash screen it's not very often that things move behind the form.

Thanks,
Dameon Black
GeneralRe: Very nice, but Almost it would seem Pin
fadee22-Mar-07 22:25
fadee22-Mar-07 22:25 
GeneralRe: Very nice, but Almost it would seem Pin
Eladisimo17-Jul-07 11:27
Eladisimo17-Jul-07 11:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.