vb.net - For some reason I can't close forms in my if statement? -


so, i'm trying close forms in app when user reverts settings via clicking button, isn't going well, reason when try close them nothing happens.

i have checked output , didn't notice anything, , strangely, if close forms without if statement, works. what's up?

private sub button2_click(sender object, e eventargs) handles button2.click     dim result dialogresult = messagebox.show("are sure want revert settings? there no undo, , if click yes, wikifinder restart.", "wikifinder", messageboxbuttons.yesno)     if (result = dialogresult.ok)         my.settings.menucolor = system.drawing.color.fromargb(248, 24, 0)         my.settings.menutextcolor = color.white         my.settings.siggy = ""         my.settings.save()         webform.close()         forumsiggy.close()         urlform.close()         menuform.close()         me.close()     else     end if end sub 

you not entering if block because dialog yes/no not ok. use

result= dialogresult.yes 

this easy determine debugging.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -