I'm making a program that was created to send text as you set it at a certain delay with a stop and start button etc.
I finished my GUI first, then went on to creating the controls and functionality portion of the program, and I've come to a halt.
Theres a few problems. Heres the main piece of code that my few problems are located in -
public GUI()
{
InitializeComponent();
//This is the part needed to create a custom shaped Form
this.FormBorderStyle = FormBorderStyle.None;
this.Width = this.BackgroundImage.Width;
this.Height = this.BackgroundImage.Height;
this.TransparencyKey = Color.FromArgb(0, 255, 0); //Can be your own color
Timer Clock;
Clock=new Timer();
Clock.Interval=5000;
Clock.Tick+=new EventHandler(Timer_Tick);
}
public void START_Click(object sender, EventArgs e)
{
Clock.Start();
}
public void STOP_Click(object sender, EventArgs e)
{
Clock.Stop();
}
public void Timer_Tick(object sender,EventArgs eArgs)
{
SendKeys.Send(textBox1.Text);
SendKeys.Send("{ENTER}");
SendKeys.Send(textBox2.Text);
SendKeys.Send("{ENTER}");
SendKeys.Send(textBox3.Text);
SendKeys.Send("{ENTER}");
SendKeys.Send(textBox4.Text);
SendKeys.Send("{ENTER}");
}
I can't compile it because it says it doesn't recognize 'Clock' in the START and STOP buttons.
Obviousl, when the program is initiated it goes and sets the height etc for the window, then its supposed to set the timer.
I guess it doesn't.
Help?
EDIT:: Also, how would I make a label increase in numbers every time the timer ticks? Since labels run in strings, I don't know how I would do this..
Thanks