It is possible that if you do not copy in me application for x minutes. That the program then closes to a few minutes? Can someone explain to me how I can handle that?
EDIT: I wanted my application to close when no body is copying for instance in 2 minutes.
How can i solve my problem?
This is my code.
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
{
const int WM_DRAWCLIPBOARD = 0x308;
if (m.Msg == WM_DRAWCLIPBOARD)
{
// Kopieert en kijkt of het overeen komt met de list
var text = Clipboard.GetText(TextDataFormat.UnicodeText);
// als je gekopieert hebt reset de clipboard
if (!string.IsNullOrEmpty(text))
{
timer1.Interval = 15000;
GetAnswer(Clipboard.GetText(TextDataFormat.UnicodeText));
Clipboard.Clear();
}
}
}
}
private void Timer1_Tick(object sender, EventArgs e)
{
this.Close();
}
}
}