Programming is all about copying and improvising, but you should try to understand what everything does before asking for help. If you do not understand how your code works, it will be hard for anyone else.
Regarding your void thing, I would argue it doesn’t work, which is why you’re asking here.
I think you need to put a breakpoint on all your events and see exactly what is happening to figure out where the problem is.