|
-
October 6th, 2008, 05:26 AM
#1
Splash screen in C#(need best object design)
I am using Visual Studio 2008 and I have to develop a dll in C#. The dll should display a splash screen. It will expose two methods:-
1. Show
2. Done
The client exe will call these two methods. The exe calls Show with image filename(with path) and other relevant details. Show will display that image in a form.
When Done is called, then all the required cleanup is done and the form is unloaded.
I have worked on C#, so know how to achieve the above but I want to know the best design because the loading of the screen should be as fast as possible. Also, it should be able to support any image format.
If required, then Show will accept the format as an argument.
What is the best way so that the screen can be displayed very fast?
When Done is called, at that time the form is loaded on screen. Therefore, I think that Show should start a thread and the form should be displayed inside that thread. After starting the thread, Show will return. Is this OK or do you suggest something else?
What cleanups, if any, should be put inside Done other than what is done by garbage collector?
What is better? To display the image on the form itself or inside some control (e.g. PictureBox) placed on the form?
Thanks.
-
October 11th, 2008, 06:23 PM
#2
Re: Splash screen in C#(need best object design)
You have a pretty good basis there.
Regarding the thread...the most common convention is to use the default (main) thread ONLY for UI. Therefore the splash can live on the main thread, but you may want to move all of the heavy initialization to a worker thread.
Regarding "cleanup". Just make sure ytou have a robust architecture that will call Dispose on EVERY object that implements IDisposable at the earliest possible time.
Good Luck.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
October 13th, 2008, 07:52 AM
#3
Re: Splash screen in C#(need best object design)
In the beginning, this looks very simple. But the problem is that the client already has implementation of splash screen (developed by some other company). I do not know what that implementation is. But the client says that they are not happy with it mostly because it takes lots of time to load. They say that there are some other reasons too because of which they want a different implementation - though I do not know what those reasons are.
This means that the client has something big in mind but they are not specifying what exactly.
-
October 13th, 2008, 08:23 AM
#4
Re: Splash screen in C#(need best object design)
 Originally Posted by visharad
In the beginning, this looks very simple. But the problem is that the client already has implementation of splash screen (developed by some other company). I do not know what that implementation is. But the client says that they are not happy with it mostly because it takes lots of time to load. They say that there are some other reasons too because of which they want a different implementation - though I do not know what those reasons are.
This means that the client has something big in mind but they are not specifying what exactly.
Without knowing:
1) The existing implementation
2) The "problems" with the implementation (slow is not a problem, it is a symtom).
3) The required behaviour (performance should be part of a specification)
It is impossible to provide any further guidance. Gather the requested information from your client..THEN post back here....
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
October 14th, 2008, 01:46 AM
#5
Splash screen in C#(need best object design)
C# is a part of .Net and it is based on the object oriented programming language. C# is intended to be a simple, modern, general-purpose, object-oriented programming language. Because software robustness, durability and programmer productivity are important. The language should include strong type checking, array bounds checking, detection of attempts to use uninitialized variables, source code portability and automatically garbage collection.
___________________________________________
Mens Carhartt Coats dubai real estate
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|