Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Simplest way to implement irregular forms in .NET

0.00/5 (No votes)
24 Jan 2011 5  
Make irregular splash screens without writing a single line of code!
Irregular splash screens are quite common these days (e.g. Photoshop, etc.)
Do you want to make an irregular splash screen for your .NET application with minimal or no code at all? Here is the tip:

  1. Prepare the irregularly shaped image in GIF format with
    transparent background in your favorite image editor
  2. On your .NET WinForm, set this GIF image as the
    BackgroundImage property of the form. The image should appear on
    the form now
  3. Set the FormBorderStyle property as 'None'
  4. Set the BackgroundImageLayout property as 'None'
  5. Set the BackColor property to a color that is not in your
    picture (eg. Teal)
  6. Set the TransparencyKey property of form to the same color
  7. Run the application: You have made your irregular splash
    screen. Don't forget to set the StartPosition property to
    CenterScreen too



Hope this is a helpful tip. Forgive me if some of you already know this. In earlier days, I used to write a full class with drawing functions to achieve the same effect.

Nejimon CR
Software Developer
Kerala, India

You might also like to take a look at my article on CodeProject:
Serial Foot Pedal Device Server[^]

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here