Mustafa
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
Pretty general question here. How would I go about receiving input from my user while they aren't tabbed into the program or have a different window as their foreground window? I'm using the InputSimulator Nuget package (InputSimulatorStandard version), and I'd like for my program to send inputs to a game window when it receives controller input. My only issue, now, is that the controller input isn't received unless I have my application as the foreground window.
This timer runs when a checkbox is
on
, and is stopped when that checkbox is turned off
. It functions fine, but I can't receive said controller input unless the app is opened, which kind of ruins the whole point of this functionality.
I've experimented with trying to use something of similar function to GetAsyncKeyState()
, but as far as I know, nothing of such would work for a controller.
Previously, I created a thread regarding this question and received two answers; one to use RawGameController
rather than Windows.Gaming.Input.Gamepad
, and the other to check if my application receives input in the background. While the use of RawGameController
did work for the project, my program did not receive background input while minimized. Upon using Spy++ as another user recommended, I reaffirmed that my program could not receive input when minimized.
I've tried to run my inputs via a background thread, but to no avail, as controller input was still only received while my program was the foreground window. Would appreciate some help on what direction I should try going with this.32 replies
Receiving Game Controller Input while Minimized (WinForms C#)
Pretty general question here. How would I go about receiving input from my user while they aren't tabbed into the program or have a different window as their foreground window? I'm using the InputSimulator Nuget package (InputSimulatorStandard version), and I'd like for my program to send inputs to a game window when it receives controller input. My only issue, now, is that the controller input isn't received unless I have my application as the foreground window.
This timer runs when a checkbox is
on
, and is stopped when that checkbox is turned off
. It functions fine, but I can't receive said controller input unless the app is opened, which kind of ruins the whole point of this functionality.
I've experimented with the use of GetAsyncKeyState()
, but as far as I know, that wouldn't work for a controller.41 replies
✅ Receiving Input While Minimized (WinForms C#)
Pretty general question here. How would I go about receiving input from my user while they aren't tabbed into the program or have a different window as their foreground window? I'm using the InputSimulator Nuget package (InputSimulatorStandard version), and I'd like for my program to send inputs to a game window when it receives controller input. My only issue, now, is that the controller input isn't received unless I have my application as the foreground window.
This timer runs when a checkbox is
on
, and is stopped when that checkbox is turned off
. It functions fine, but I can't receive said controller input unless the app is opened, which kind of ruins the whole point of this functionality.25 replies