Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27189

Shift key send and gamepad questions

$
0
0
Hello. I am using Visual Studio 2010 and have two questions about Visual Basic:
1. How to send Shift key? with My.Computer.Keyboard.SendKeys command I can only tell the program to use Shift with other key (Shift+K) for eample. But, I want to send just the Shift key (without any other key combination).
2. I am using the following code:
Dim currentStateButtons As GamePadState = GamePad.GetState(Microsoft.Xna.Framework.PlayerIndex.One)
If currentStateButtons.IsConnected = True Then

The problem is, it recognize my xbox360 gamepad only when the program is running. If it goes off and on again, IsConnected function returns FALSE.
To solve this problem, I can: unload and run the form again, or restart the whole application. Is there better solution? Thanks!

Viewing all articles
Browse latest Browse all 27189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>