i used Findwindow Api and i got the handle i wanna but i want add to listbox the handle of each App like (i have 2 notepad opened ) Findwindow will get the first handle i want to know the first and the sec handl and add them to listbox to sendmessage for the selected ...

and i have a sec question :
how can i sendmessage as a keybord Event not as a char
And i tried this code for sendMessage F1
Code Code:
  1. Call SendMessage(FindWindow("Notepad", vbNullString), WM_KEYDOWN, vbKeyF1, 0)
  2. Call SendMessage(FindWindow("Notepad", vbNullString), WM_KEYUP, vbKeyF1, 0)
THX ...