I have some error in the next loop and I do not know what it is since it does not return any errors, it just hangs up ..
While GetKeyState(Keys.Insert).ToString <> "-127" Or GetKeyState(Keys.Insert).ToString <> "-128" If GetKeyState(Keys.Insert).ToString = "-127" Or GetKeyState(Keys.Insert).ToString = "-128" Then PosMouse.Text = "OK" Exit Sub End If End While
I have 2 programs: listen.exe and main.exe
Pressing a button in the listen.exe program will activate the loop so that when you press "INSERT" in the main.exe program, the position of the mouse will be recorded.
With what I can move the mouse to that position later.
I got out of trouble with a timer but I'm curious about the solution ...
Greetings and thank you very much!