I had a little problem when I ran this.... Cut and paste into IDE then F5. A small black window view appeared in the top left corner of the screen just for a moment. Pressed F5 again. The black window view appeared again and the whole display locked up. Rebooted. Re-ran. F5 black window again for a moment. F5 and the program ran normally. Escape to end. Tried again and the black window appeared again and locked up the system. Each time it locked up, the only two thing that worked was mouse movement and the system reset button....
I checked the listing. There doesn't seem to be anything there tat I have not used before (except for checking:off).
The time that it ran, it ran very well... I see what you mean about the 'dark grey' lines. Looks a lot like the qbasic screen saver, Mystify... Cool...
As the listing looks 'normal', I'm going to assume that the problem may be with my machine, and pass on running again until I try to figure out the problem.
I am running on Linux Mint 20, 64bit using QB64 1.5 stable from git 3043116