level 8
薛振梁
楼主
这段代码为什么GetPressedKeys会引发Microsoft.DirectX.DirectInput.NotAcquiredException错误?
Dim dev As Device = New Device(SystemGuid.Keyboard)
dev.SetCooperativeLevel(Me, CooperativeLevelFlags.Foreground Or CooperativeLevelFlags.NonExclusive)
For Each i As Key In dev.GetPressedKeys
n.Text += i.ToString + " "
Next i
'n是一个Lable。
又不是木有键盘……
2013年07月30日 09点07分
1
Dim dev As Device = New Device(SystemGuid.Keyboard)
dev.SetCooperativeLevel(Me, CooperativeLevelFlags.Foreground Or CooperativeLevelFlags.NonExclusive)
For Each i As Key In dev.GetPressedKeys
n.Text += i.ToString + " "
Next i
'n是一个Lable。
又不是木有键盘……