THREADS

Jaya J

Total Post:9

Points:63
Posted by  Jaya J
C# 
 1117  View(s)
Ratings:
Rate this:
I have Login window as MainWindow of WPFApplication using c#.When i Click on Login button it opens another Window named Student.Now i want to close LoginWindow because when i'm working with Student Window there is no need of LoginWindow.

How can i close LoginWindow using Threads.Is it possible?.If possible Please tell me the code for this Problem
  1. Kamlakar Singh

    Post:194

    Points:1396
    Re: Threads

    Try this code:

    public void RanToCompletion(Task task)
        {
            if(_frmProgress.Dispatcher.CheckAccess())
                _frmProgress.Close();
            else
                _frmProgress.Dispatcher.Invoke(DispatcherPriority.Normal, new ThreadStart(_frmProgress.Close));
        }

      Modified On Apr-09-2018 03:52:41 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!