You type something then press a button,then it starts blinking.To start
I am just working with one letter.It uses a switch to decide what letter
you typed.Then it makes the members of an array either 0,1, or 2. 0 being
a space, 2 being a long, and 1 being a short.I use timers to decide how
long the blink lasts.My problem is:I can't make the program wait until
the timer ticks, so I can start the next one
char letter = textbox1.text;
for (int i = 0;i<1;i++)
{
switch (letter)
{
case 'a':
a[0] = 0;
a[1] = 1;
a[2] = 0;
a[3] = 2;
break;
}
for (int h = a.length; h < a.length;h++)
{
what = a[h]
switch ( what )
{
case 0:
timer1.enabled = true;
break;
case 1:
timer2.enabled = true;
break;
case 2:
timer3.enabled = true;
}
}
}
private void timerA()
{
picturebox1.backcolor = System.Drawing.color.Greenyellow;
timer1.enabled = false;
}
private void timerB()
{
picturebox1.backcolor = System.Drawing.color.empty;
timer2.enabled = false;
}
private void timerC()
{
picturebox1.backcolor = System.Drawing.color.empty;
timer3.enabled = false
}

New Topic/Question
Reply



MultiQuote



|