how to perform a hold ALT+TAB sendkey event in C#

前端 未结 4 619
悲哀的现实
悲哀的现实 2021-01-13 11:43

I am trying to use a sendkey event that holds the ALT key and then presses the TAB key. How do you perform that action, I\'ve tried many variations but I can\'t seem to find

4条回答
  •  没有蜡笔的小新
    2021-01-13 12:25

    [Windows.Forms.Sendkeys]::SendWait("%{Alt Down}")

    [Windows.Forms.Sendkeys]::SendWait("%{TAB}")

    [Windows.Forms.Sendkeys]::SendWait("%{Alt Up}")

    Works in Powershell for me! Thanks for tips ;)

提交回复
热议问题