Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在window User32.dll中使用上/下箭头键_C#_.net_Postmessage_User32_Findwindow - Fatal编程技术网

C# 在window User32.dll中使用上/下箭头键

C# 在window User32.dll中使用上/下箭头键,c#,.net,postmessage,user32,findwindow,C#,.net,Postmessage,User32,Findwindow,用于登录到应用程序的dll所有插入/按钮单击工作正常问题是在一个窗口中,我需要使用上下键箭头,而不是按键,我不能这样做。这是我登录并找到此窗口后的代码 currChild = FindWindowEx(intWhdr, prevChild, "WindowsForms10.SysTreeView32.app.0.33c0d9d", "TreeView"); SetForegroundWindow(currChild);

用于登录到应用程序的dll所有插入/按钮单击工作正常问题是在一个窗口中,我需要使用上下键箭头,而不是按键,我不能这样做。这是我登录并找到此窗口后的代码

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);
这不起作用。有人知道如何按聚焦窗口上的箭头键吗

附言


Stackoverflow请检查为什么当我发布一个问题时,前2-3.5个世界正在消失

如果前两个单词正在消失,可能是因为这是一个毫无意义的问候语,如hello all或类似的问候语-这些只是噪音,因此会自动删除它们。此外,正如我在上一个问题上所建议的,切换到使用可能会更好,而不是在低级别闲逛和发送窗口消息。它可以让您以更具语义的方式进行交互-即通过选择此子项,而不是向上、向下、向下、向左,然后按回车键。我从未使用过此选项,我是winform中的新手,您有任何示例吗?