|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
IntroductionEvery well designed commercial windows application needs a good splash window to display the name of the application, company details, copy right notice and other contact information. The same window can be displayed as an About box.
DetailsThe images below show the CuteSplash example in action. The main window in the example is only a dummy window with no functionality and is used only to show how the Splash Window works.
A thread is kicked off on Here is the relevant code. void DrawSplashWindow()
{
mrEvent = new ManualResetEvent(false);
mrEvent.WaitOne(4000, true);
//fader loop
for (double i=100.0; i>=0.0; i-=5.0) // run opacity index
{
Opacity = i/100.0;// decrease opacity
Thread.Sleep(50);
}
Close();
}
When the Close button is pressed the private void OnClose(object sender, System.EventArgs e)
{
// make the close button invisible
CloseBtn.Visible = false;
// flag the DrawSplashWindow thread to exit
mrEvent.Set();
}
LimitationOpacity property is available only on Windows 2000 and Windows XP !
Extending the codeThere are many ways the example given in this article can be used to enhance the splash window.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||