06-24-2024, 12:30 PM
(translated by Google translator)
Hello Elzaimer.
I don't speak English well. Therefore, it is difficult for me to explain my thoughts to you. But I'll try.
Although I am also a newbie, I see that you declared an event handler subroutine " GraphicsWindow.KeyDown = test " inside the loop. And now, the subroutine is declared every time the loop is executed. And the handler subroutine must be declared once at the beginning of the code of the entire program.
Also, there doesn't seem to be any code in your "test" routine that tells the program what to do if no key is pressed. Therefore, the program does not stop and does not wait for a key to be pressed.
And I also know that the event handler routine should contain as little code as possible. You can see this in some example.
Hello Elzaimer.
I don't speak English well. Therefore, it is difficult for me to explain my thoughts to you. But I'll try.
Although I am also a newbie, I see that you declared an event handler subroutine " GraphicsWindow.KeyDown = test " inside the loop. And now, the subroutine is declared every time the loop is executed. And the handler subroutine must be declared once at the beginning of the code of the entire program.
Also, there doesn't seem to be any code in your "test" routine that tells the program what to do if no key is pressed. Therefore, the program does not stop and does not wait for a key to be pressed.
And I also know that the event handler routine should contain as little code as possible. You can see this in some example.
