Here is a sample program that takes what is in textBox1 and puts it into textBox2 one word at a time. The form has the two textbox, a button, and a timer (with a delay of 5 for my test).
using System;
using System.Collections;
using System.Windows.Forms;
namespace WindowsFormsApplication2 {
public partial class Form1 : Form {
IEnumerator iterator;
String[] array;
public Form1() {
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) {
array = textBox1.Text.Split(' ');
iterator = array.GetEnumerator();
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e) {
if (iterator == null || iterator.MoveNext() == false) {
timer1.Enabled = false;
} else {
textBox2.Text += iterator.Current + " ";
}
}
}
}
Modify as you see fit.
Momerath
Nearly a Senior Poster
3,386 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558