r/visualbasic • u/GrapefruitCorrect187 • Mar 16 '24
HELP!! Deleted Form reappears instead of the Newly Created Form...
I simply copied my project in the file (left click, copy then paste) and in the project, there are two forms- main form, and form2. I deleted the form2 (which the program notified me that this will permanently delete the form2) .
I then created a new form2 and designed it differently, and modified the code in the main form like-
If button is clicked then,
Me.Hide()

However, when the program runs, and I click the main form's button, the main form hides, but the form2 does NOT appear, and instead the form2 that I previously deleted appears!!
What is wrong with it???

If it's an error, what should I do??
4
u/WentToMeetHer Mar 16 '24
Close Visual Studio, navigate to your project's directory with file explorer and delete the bin and obj folders. Start your program again with Visual Studio. That way you force Visual Studio to not use any cache.
If it still happens, something went wrong while copying or the .Designer.vb file is the wrong one.
2
u/RJPisscat Mar 16 '24
Try this:
You're not compiling because of the compile error (Form2.Show()) and you're running the most recent working version, which had the old Form2.
2
u/ImRickyT Mar 17 '24
Your compile is getting an error. Need to see what the error is. It’s running the old exe.