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:
- Prepare the irregularly shaped image in GIF format with
transparent background in your favorite image editor
- On your .NET WinForm, set this GIF image as the
BackgroundImage property of the form. The image should appear on
the form now
- Set the
FormBorderStyle property as 'None'
- Set the
BackgroundImageLayout property as 'None'
- Set the
BackColor property to a color that is not in your
picture (eg. Teal)
- Set the
TransparencyKey property of form to the same color
- 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[
^]
Nejimon CR was born and brought up in a small village called Kanjiramattom in Kerala, India. He started coding in early 2000s with classic Visual Basic 6, later moving onto .NET platform. His favorite flavors of language are VB.Net and C#.Net. Knowledge of MASM and ample experience with Win32 APIs has helped polish his expertise of Windows programming to a greater extent.
His areas of interests have been: MASM, UI Automation, AutoIt Scripts, Microsoft Technologies in general, etc.
His latest areas functioning are: WPF, Silverlight, MVVM, Linq, Extension Methods, Entity Framework, Code First Development, RIA Services, etc.
His Articles on CodeProject:
http://www.codeproject.com/Articles/567356/Asynchronous-Access-of-Web-Service-from-WPF-with-B
http://www.codeproject.com/Articles/63849/Serial-Foot-Pedal-Device-Server
http://www.codeproject.com/Tips/149249/Simplest-way-to-implement-irregular-forms-in-NET
http://www.codeproject.com/Tips/564388/Entity-Framework-Code-First-Navigation-Property-is