VB.NET Send Tab key to another application window

后端 未结 3 1262
长情又很酷
长情又很酷 2021-01-07 15:40

I want to send \"{TAB}\" Key to another application window(send the key to the window not to textbox).

I tried:

SendMessage(hWnd, WM         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-07 16:16

    Having struggled with this type of this a few times before, i would suggest a couple of things to look at.

    The 1st is autoit which includes a dll you can reference from vb.net, and is very simple you use, and well documented. I tend to use that whenever i need to control a 3rd party program.

    The other is the ui automation classes See this for an example:

    http://blog.functionalfun.net/2009/06/introduction-to-ui-automation-with.html

提交回复
热议问题