title: Clearing the Clipboard
body: <p>I have the following console application in C#</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Timers;
  using System.Windows.Forms;
  
  namespace PreventScreenshot
  {
      class Program
      {
          [STAThread]
          public static void Main(string[] args)
          {
              System.Timers.Timer timer1 = new System.Timers.Timer();
              timer1.Elapsed += new ElapsedEventHandler(timer_Tick);
              timer1.Interval = 1000;
              timer1.Enabled = true;
              timer1.Start();
  
              Console.WriteLine("---Prevent Screenshot from being taken---");
              Console.WriteLine();
              Console.WriteLine("DLL operation started.  Try to take a screenshot");
              Console.WriteLine();
              Console.WriteLine("Press enter to exit");
              Console.ReadLine();
          }
  
          public static void timer_Tick(object sender, EventArgs e)
          {
              Clipboard.Clear();
          }
      }
  }
  </code></pre>
  
  <p>Supposedly, the application clears the clipboard every second.  However, it is not working.  What is the problem?</p>
  
  <p>Edit:</p>
  
  <p>I just edited the code.  When I try to run the program, the clipboard is still not cleared.  What is happening?</p>