VB Code:
  1. Private Idx as integer = 0
  2.     Private strToDisplay as string = "Hello, this is just a test ."
  3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.         Dim text As System.Diagnostics.Process
  5.         Text = System.Diagnostics.Process.Start("C:\WINDOWS\Notepad.exe")
  6.         text.WaitForInputIdle()
  7.         AppActivate(text.Id)
  8.         Idx  = 0
  9.         Me.Timer1.Interval = 2000
  10.         Me.Timer1.Start()
  11.     End Sub
  12.  
  13.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  14.         SendKeys.Send(strToDisplay.substring(Idx,1)
  15.         SendKeys.Flush()
  16.         idx = idx + 1
  17.         if idx > strToDisplay.Length then
  18.            Me.Timer1.Stop()
  19.         End If
  20.     End Sub