VB Code:
Private Idx as integer = 0
Private strToDisplay as string = "Hello, this is just a test ."
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim text As System.Diagnostics.Process
Text = System.Diagnostics.Process.Start("C:\WINDOWS\Notepad.exe")
text.WaitForInputIdle()
AppActivate(text.Id)
Idx = 0
Me.Timer1.Interval = 2000
Me.Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SendKeys.Send(strToDisplay.substring(Idx,1)
SendKeys.Flush()
idx = idx + 1
if idx > strToDisplay.Length then
Me.Timer1.Stop()
End If
End Sub