Em Andamento

GetAsyncKeyState problem c#

Hi i need code fix heres the code:

public static void GetKey()

{

string keyBuffer = "";

foreach ([url removed, login to view] i in [url removed, login to view](typeof(Keys)))

{

if ([url removed, login to view](typeof(Keys), i) != "LButton")

{

int x = GetAsyncKeyState(i);

if ((x == 1) || (x == -32767) || (x == -32768))

{

keyBuffer += [url removed, login to view](typeof(Keys), i) + " ";

Object ki = [url removed, login to view](typeof(Keys), i);

if (keyBuffer == "LButton")

{

}

if (keyBuffer == "RButton")

{

}

if (keyBuffer == "LShiftKey")

{

}

if (keyBuffer == "RShiftKey")

{

}

if (keyBuffer == "RMouse")

{

}

if (keyBuffer == "LMouse")

{

}

else

{

[url removed, login to view](ki);

}

}

}

}

and for import:

[DllImport("[url removed, login to view]")]

public static extern short GetAsyncKeyState([url removed, login to view] vKey); // Keys enumeration

[DllImport("[url removed, login to view]")]

public static extern short GetAsyncKeyState([url removed, login to view] vKey);

The problem is that im gettin multiplayed keys if i press once key i key 2-3 times this key. the problem is dissapering when i use only if ((x == 1) || (x == -32767) there i get one key but i dont get keys for excel if you have ready to use solution please show me the console demo. I need to key be showed only once when only once pressed and to work in excel too.

Habilidades: Programação C#

Ver mais: user32, string problem, else programming, dll system programming, string programming, sharp object, programming static, programming else, programming extern, programming enum, get string, console c, gravity forms notifications problem, dllimport, windows forms import excel, fix dll work windows, fix code excel, fabrik forms joomla problem, problem resolution tracking forms, joomla safari forms problem, javascript registration forms

Acerca do Empregador:
( 11 comentários ) Jastrowie, Poland

ID do Projeto: #6811322

Premiar a:

sergpooh

need to write at least a hundred characters need to write at least a hundred characters need to write at least a hundred characters

$15 USD em 1 dia
(0 Avaliações)
0.0

2 freelancers estão ofertando em média $20 para este trabalho

aruny308

Hi, I would like to solve your problem. Thanks . . . .

$25 USD em 1 dia
(17 Comentários)
4.4