Click here to Skip to main content
11,573,862 members (58,588 online)
Click here to Skip to main content

Simplest way to implement irregular forms in .NET

, 24 Jan 2011 CPOL 28.7K 42
Rate this:
Please Sign up or sign in to vote.
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Nejimon CR
Architect
India India
Nejimon CR started coding in early 2000s with classic Visual Basic 6, later moving onto .NET platform. His favorite flavor of language is C#.Net, previously VB.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: ASP.NET MVC, Web API, Node.js, Linq, Entity Framework,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

You may also be interested in...

Comments and Discussions

 
GeneralMy vote of 5 Pin
Pravin Patil, Mumbai16-Jul-12 20:41
memberPravin Patil, Mumbai16-Jul-12 20:41 
GeneralReason for my vote of 5 it is simple and very usefull Pin
Asutosha9-Jan-12 19:10
memberAsutosha9-Jan-12 19:10 
GeneralReason for my vote of 5 My vote of 5 A very simple and elega... Pin
chathuranga abeyrathne19-Oct-11 6:55
memberchathuranga abeyrathne19-Oct-11 6:55 
GeneralMy vote of 5 A very simple and elegant idea Pin
Reiss1-Sep-11 1:33
memberReiss1-Sep-11 1:33 
GeneralReason for my vote of 5 So simple yet so powerful. Nice. Pin
zulu6-Jul-11 12:52
memberzulu6-Jul-11 12:52 
GeneralReason for my vote of 5 Great tip!!! Pin
XChronos13-Feb-11 15:57
memberXChronos13-Feb-11 15:57 
GeneralThis is a nice tip, but be aware that it will not work with ... Pin
RobertWAnderson1-Feb-11 7:45
memberRobertWAnderson1-Feb-11 7:45 
GeneralYes, simple is good. Pin
Oscar D Martinez31-Jan-11 8:39
memberOscar D Martinez31-Jan-11 8:39 
Yes, simple is good.
GeneralThanks for the comment very simple and useful Pin
jesuseg0731-Jan-11 6:08
memberjesuseg0731-Jan-11 6:08 
GeneralReason for my vote of 5 I like these simple tricks! Pin
MrRexx27-Jan-11 0:24
memberMrRexx27-Jan-11 0:24 
GeneralRe: Thanks for the comment Pin
Nejimon CR28-Jan-11 3:01
memberNejimon CR28-Jan-11 3:01 
GeneralReason for my vote of 5 Simple and nice Pin
Lokanta_brahmachari25-Jan-11 1:36
memberLokanta_brahmachari25-Jan-11 1:36 
GeneralRe: Thank you.. Pin
Nejimon CR28-Jan-11 3:01
memberNejimon CR28-Jan-11 3:01 
GeneralReason for my vote of 5 Nice tip! Pin
Manfred R. Bihy23-Jan-11 6:35
mvpManfred R. Bihy23-Jan-11 6:35 
GeneralRe: Thank you Pin
Nejimon CR28-Jan-11 3:01
memberNejimon CR28-Jan-11 3:01 
GeneralReason for my vote of 5 So simple. Never thought of that mys... Pin
Mr.Jinky22-Jan-11 22:38
memberMr.Jinky22-Jan-11 22:38 
GeneralRe: Thank you, Mr. Jinky Pin
Nejimon CR28-Jan-11 3:00
memberNejimon CR28-Jan-11 3:00 
GeneralRemoved 'Email' to avoid spam. Pin
Sandeep Mewara22-Jan-11 7:57
mvpSandeep Mewara22-Jan-11 7:57 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150624.2 | Last Updated 24 Jan 2011
Article Copyright 2011 by Nejimon CR
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid