Você está na página 1de 1

form 1

private sub button1_click(byval sender as system.object, byval e as


system.eventargs) handles button1.click
dim objform2 as new form2
dim s as string = msgbox("open in a modal mode?", msgboxstyle.yesnocancel)
if s = msgboxresult.yes then
objform2.showdialog()
elseif s = msgboxresult.no then
objform2.show()
end if
end sub

-----------------------------------------------------------

private sub button2_click(byval sender as system.object, byval e as


system.eventargs) handles button2.click
dim s as string
s = msgbox("would you like to terminate the program?", msgboxstyle.yesno)
if s = msgboxresult.yes then
end
end if
end sub
end class

Você também pode gostar