Hello,

i'm attempting to create a splash screen using the code snippet posted on this site(i.e. DaniWeb) - http://http://www.daniweb.com/code/snippet697.html

However, I'm having some difficulty. It appears that the splash screen will continue to run w/out disposing itself. That is, the screen hangs and does not go away. Also, the screen is flickering although the Update() method has been overriden.

I'm instantiating the splash object in the Main method of the application. Here's a snippet:

Splash oSplash = new Splash();
oSplash.main(args);

any help is appeciated.

Wouldn't it be better when your loading your application to display the splash screen, set a Timer running in the background, then close the splash screen and start the application? Not sure how that tutorial explains it cause I've not taken the time to read it.

Hello AcidBurn,

thx for the reply. it is appreciated. actually, i was able to find the solution to the problem. it appears that there are couple calls in the code to synchronize the thread the splash screen is rnning on. these multiple calls was causing the flicker. so, i removed the "synchronized" call in the paint method.

the infinite loop was being caused by "forName" call for the class, so it was removed as well.

as far as the timer, when the thread is synchonized, the wait method is invoked w/ x amount of milliseconds.

thx again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.