Home > DeveloperSection > Forums > Threads
Jaya J
Jaya J

Total Post:9

Posted on    March-25-2015 10:18 PM

 .NET C# 

 1 Reply(s)
 897  View(s)
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

Kamlakar Singh
Kamlakar Singh

Total Post:194

Posted on    March-30-2015 7:41 AM

Try this code:

public void RanToCompletion(Task task)


        if (_frmProgress.Dispatcher.CheckAccess())



            _frmProgress.Dispatcher.Invoke(DispatcherPriority.Normal, new ThreadStart(_frmProgress.Close));


Don't want to miss updates? Please click the below button!

Follow MindStick