共用方式為


KeyInterop.KeyFromVirtualKey(Int32) 方法

定義

將 Win32 Virtual-Key 轉換成 WPF Key

public:
 static System::Windows::Input::Key KeyFromVirtualKey(int virtualKey);
public static System.Windows.Input.Key KeyFromVirtualKey (int virtualKey);
static member KeyFromVirtualKey : int -> System.Windows.Input.Key
Public Shared Function KeyFromVirtualKey (virtualKey As Integer) As Key

參數

virtualKey
Int32

要轉換的虛擬按鍵。

傳回

Key

WPF 機碼。

適用於