0

dll for login to application all inserts/button click works fine the proble is in one window where i need to use up and down key(arrow NOT keyPressed) and i can't do that. here my code after i logined and find this window

currChild = 
FindWindowEx(intWhdr, prevChild, "WindowsForms10.SysTreeView32.app.0.33c0d9d", "TreeView");
                    SetForegroundWindow(currChild);
                    PostMessage(currChild, VK_DOWN, 0, 0);// VK_DOWN = 0x28;
                    PostMessage(currChild, VK_DOWN, 0, 0);
                    PostMessage(currChild, VK_DOWN, 0, 0);

And this is not working.Any one know how to press the arrow key on focused window?

P.S

Stackoverflow please check why when i posting a question a first 2-3.5 world are disappearing

user3567884
  • 213
  • 1
  • 6
  • 19
  • If the first couple of words are disappearing, it's probably because it's a pointless greeting like "hello all" or similar - these are just noise and SO automatically removes them. – Damien_The_Unbeliever May 14 '14 at 06:08
  • Also, as I suggested on your previous question, you'd probably be far better served with switching to using [UI Automation](http://msdn.microsoft.com/en-us/library/ms747327(v=vs.110).aspx) rather than poking around at the low level and sending window messages. It lets you interact in a more "semantic" way - i.e. by "select this child item", rather than "up, down, down, left, press return". – Damien_The_Unbeliever May 14 '14 at 06:11
  • i never used this i am new in winform do you have any example? – user3567884 May 14 '14 at 06:17

0 Answers0