Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/292.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# 发送键Ctrl+;S在Powershell/Winform中_C#_Winforms_Powershell - Fatal编程技术网

C# 发送键Ctrl+;S在Powershell/Winform中

C# 发送键Ctrl+;S在Powershell/Winform中,c#,winforms,powershell,C#,Winforms,Powershell,我正在使用: start-sleep -Milliseconds 100 [System.Windows.Forms.SendKeys]::SendWait('^{S}') 这是正确的语法吗?因为对于已在VSCode中命名的文件,我使用了“另存为”而不是“保存”。您可以使用以下语法之一: Ctrl+S保存:^S 按Ctrl+Shift+S组合键保存为:^S或^+S 您共享的语法也发送Ctrl+Shift+S。但是您不需要在S周围使用{}。 有关语法的更多信息,请参阅:。为什么要向V

我正在使用:

start-sleep -Milliseconds 100
[System.Windows.Forms.SendKeys]::SendWait('^{S}')    

这是正确的语法吗?因为对于已在VSCode中命名的文件,我使用了“另存为”而不是“保存”。

您可以使用以下语法之一:

  • Ctrl+S保存:
    ^S
  • 按Ctrl+Shift+S组合键保存为:
    ^S
    ^+S
您共享的语法也发送Ctrl+Shift+S。但是您不需要在
S
周围使用
{}

有关语法的更多信息,请参阅:。

为什么要向VS代码发送击键?