This is the code I'll be using and building on throughout the course of my programming class this semester. The Update function to get the window to close out sometimes works and sometimes doesn't. When it doesn't work, the error is " returned a result with an error set" Code with error it's all copied from my professor's code so I don't get why it isn't working
When I comment out lines 12-14 it works but I have to force stop the whole program. I've tried restarting Visual Studio and it didn't help. Getting to the point where this isn't an option anymore because more is beginning to get added to Update and the functionality is needed.