visharad
October 6th, 2008, 05:26 AM
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.
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.