Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (NameBox.Text.Length == 0)
     {
         MessageBox.Show("Please enter a string to search in the title of the window.");
     }
     else
     {
         WindowHider.HideWindows(NameBox.Text);
     }
 }
Exemplo n.º 2
0
        public static void HideWindows(string namepart)
        {
            Window[] windows = WindowHider.GetAllWindows();

            foreach (Window w in windows)
            {
                if (w.Title.Contains(namepart))
                {
                    HideWindow(w);
                }
            }
        }