i don't know much about this but i think it has to do with the instantiation. put dim f as new form2() inside the button click event along with the .showdialog(). it works.