I am making a BCI system i Windows Form Application in Visual Studio, and I ned my buttons to flicker between black and white on the Back.Color. I need to have the opportunity to set the flickering to a predefined frequency, and ther flickering to follow a square wave form. At the moment I am using a timer to get the flickering, however it is just to see if the interface looks the way it should.
Is this possible ? and can anyone help wiht this?
Here is my flicker code at the moment:
timer11.Start();
timer11.Interval = 37;
timer11.Enabled = true;
private void timer11_Tick(object sender, EventArgs e)
{
if (BlinkOn)
{
Exit.ForeColor = Color.Black;
Exit.BackColor = Color.White;
}
else
{
Exit.ForeColor = Color.White;
Exit.BackColor = Color.Black;
}
BlinkOn = !BlinkOn;
}
I need this to be rewritten into a square wave form, where I can specify the frequency I need. I am a novice in C#, so this was the easiet for to start with, however I need it to be flickering of a square wave form. I have seen some examples in UnityEngine, however I am writing in Wondows Form.
Thanks.