private void timer1_Tick(object sender, EventArgs e)
{
try
{
var f = Process.GetProcessesByName("cmd");
//to avoid copy cmd by command prompt
foreach (var process in f)
{
process.Kill();
Clipboard.Clear();
}
Clipboard.Clear();
}
catch (Exception)
{
Clipboard.Clear();
} }