Jump to content

Currently I'm using:

SendKeys.Send("{SCROLLLOCK}");

It "works" but the problem is that the Scroll lock LED just blinks and doesn't stay on. Any suggestions?

Asrock 890GX Extreme 3 - AMD Phenom II X4 955 @3.50GHz - Arctic Cooling Freezer XTREME Rev.2 - 4GB Kingston HyperX - AMD Radeon HD7850 - Kingston V300 240GB - Samsung Spinpoint F3 1TB - Chieftec APS-750 - Cooler Master HAF912 PLUS


osu! profile

Link to comment
https://linustechtips.com/topic/206385-c-sendkeys/
Share on other sites

Link to post
Share on other sites

*bump* anyone?

Asrock 890GX Extreme 3 - AMD Phenom II X4 955 @3.50GHz - Arctic Cooling Freezer XTREME Rev.2 - 4GB Kingston HyperX - AMD Radeon HD7850 - Kingston V300 240GB - Samsung Spinpoint F3 1TB - Chieftec APS-750 - Cooler Master HAF912 PLUS


osu! profile

Link to comment
https://linustechtips.com/topic/206385-c-sendkeys/#findComment-2802485
Share on other sites

Link to post
Share on other sites

what do you mean by "it blinks"? it blinks once and then stops? or keeps blinking?

just one short blink

Asrock 890GX Extreme 3 - AMD Phenom II X4 955 @3.50GHz - Arctic Cooling Freezer XTREME Rev.2 - 4GB Kingston HyperX - AMD Radeon HD7850 - Kingston V300 240GB - Samsung Spinpoint F3 1TB - Chieftec APS-750 - Cooler Master HAF912 PLUS


osu! profile

Link to comment
https://linustechtips.com/topic/206385-c-sendkeys/#findComment-2802596
Share on other sites

Link to post
Share on other sites

it looks like send() only simulates a single keystroke in your application

to simulate the physical press of the scroll lock button, you should give a try at the win API keybd_event

Isn't that a C++ thing?

Asrock 890GX Extreme 3 - AMD Phenom II X4 955 @3.50GHz - Arctic Cooling Freezer XTREME Rev.2 - 4GB Kingston HyperX - AMD Radeon HD7850 - Kingston V300 240GB - Samsung Spinpoint F3 1TB - Chieftec APS-750 - Cooler Master HAF912 PLUS


osu! profile

Link to comment
https://linustechtips.com/topic/206385-c-sendkeys/#findComment-2802659
Share on other sites

Link to post
Share on other sites

the code sample on msdn is C++, but it's a winapi so you can be sure you'll be able to use it in C#

Cool, thanks. Will try :)

Asrock 890GX Extreme 3 - AMD Phenom II X4 955 @3.50GHz - Arctic Cooling Freezer XTREME Rev.2 - 4GB Kingston HyperX - AMD Radeon HD7850 - Kingston V300 240GB - Samsung Spinpoint F3 1TB - Chieftec APS-750 - Cooler Master HAF912 PLUS


osu! profile

Link to comment
https://linustechtips.com/topic/206385-c-sendkeys/#findComment-2802692
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×