4
I need to detect if the user is scrolling down the mouse scroll.
I tried with the GetKeyState
, but it seems that there is no way to pass as parameter the scrolling of the mouse scroll.
I also found that, but I couldn’t figure out how to use it in C#.
Code:
if (/* Aqui eu devo checar se o usuário está rolando o scroll */)
{
Stopwatch s = new Stopwatch();
s.Start();
while (s.Elapsed < TimeSpan.FromMilliseconds(300))
{
//Irrelevante
}
s.Stop();
}
I also found that, but I have no idea how to use in a console application.
What is the purpose ? windows Forms ?
– Rovann Linhalis
Console app.
– Francisco
I don’t know if you have this console feature.
– gato
see if it helps: https://stackoverflow.com/questions/9302891/get-wheel-delta-wparam-macro-in-c-sharp
– Rovann Linhalis
@Rovannlinhalis I had come to this question already before making my own. I didn’t understand anything that goes on there kkk
– Francisco
If you tell me what purpose you need, it might be easier to help
– Rovann Linhalis
@Rovannlinhalis Ué, I need to detect if the user is scrolling down to execute a code.
– Francisco