Hey,
This tut is extremely simple, a good one for C# beginners =)
First create a new C# project by going to
Then add 1 timer, 3 textboxes, and 2 buttons.Code:File>New>C#>Windows Forms Application
First were gonna give your timer a code, double click on your timer and add this code
The SendKeys Function basically types out the text you specify.Code:SendKeys.Send(textBox1.text); SendKeys.Send("{ENTER}"); SendKeys.Send(textBox2.text); SendKeys.Send("{ENTER}"); SendKeys.Send(textBox3.text); SendKeys.Send("{ENTER}");
Now rename one of your buttons to "Start", and give it the following code
This enabled the timer, which in return, starts spamming your text.Code:timer1.Enabled = true;
Then rename another one to "Stop", and give it the code below
This disables your times, which stops the spamming.Code:timer1.Enabled = false;
And ur done =D
How simple was that?
Hope you learned a thing or two from this.
~kierien


LinkBack URL
About LinkBacks





Reply With Quote








Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum