Form Load Cancel

Hi Experts

I need a clean way to cancel a forms load event and change the focus to a different form and load the other form.

My application starts and a splash screen loads, then form1 loads the mainstay of form1 is a listview, if the listview has no rows then Form2 should load and take the focus. At what point should I stop the form loading, bearing in mind that the form1 is the main start up form. Should I test the sql that fills the listview at form1s load  and then change the start form to form2. Or should I test the sql when the splash screen loads and change the form load at this time, what is the best option?
Who is Participating?
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
>> should I test the sql when the splash screen loads and change the form load at this time

This is the best option. You are testing if no prob with the connection ?
riyazthadConnect With a Mentor Commented:
It is good to load data from splash and if rows existing, you can decide which one to open. Form1 or Form2. There by you reduce loading and closing of one form. If u r loading or retriving data from form1 , it is not making any difference bcos one call to database any way u need.

hope it clear u.
JoeBo747Author Commented:
Hi jpaulino: & riyazthad:

Thanks for the quick response, both of you have valid points I hope you think the points are fair>

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.