deletecurentwindow method