Really thanks.

I had no idea how to fix this and you both helped me alot.

But there is still 1 think i dont understand.
vb Code:
  1. nPadHwnd = FindWindow("notepad", "Untitled - Notepad")

Class: notepad
Windows name: Untitled - Notepad

But how i get class of an program?