thread splach screen !!!
-
hello all. m working on windows application uses web services to insert and retreave data what m trying to do when the application call web service a thread splash screen appear , i did it fine but sometime i get unhandeled exception : "Thread was being aborted" how can i overcome this problime ? thanks in advance My Code: Users user = new Users();//web service LoadingIndicator.ShowLoading(); int employeeId = user.Login(userName, passWord); LoadingIndicator.HideLoading(); class LoadingIndicator { static Thread LoadingThread; public static void ShowLoading() { LoadingThread = new Thread(new ThreadStart(DoShowSplash)); LoadingThread.Start(); } public static void HideLoading() { try { if (LoadingThread.IsAlive) LoadingThread.Abort(); } catch (ThreadAbortException ex) { Thread.ResetAbort(); } } private static void DoShowSplash() { frmLoading frm = new frmLoading(); frm.ShowDialog(); } }