hypz Posted June 15, 2012 at 09:35 AM Report Share #462997 Posted June 15, 2012 at 09:35 AM Boas, eu estive a ler este artigo http://msdn.microsoft.com/en-us/library/system.windows.forms.form.closing.aspx Mas o evento "e.cancel" não está a resultar, ele acaba por fechar na mesma a form mesmo que eu diga que não na msgbox. Link to comment Share on other sites More sharing options...
Caça Posted June 15, 2012 at 09:46 AM Report Share #463001 Posted June 15, 2012 at 09:46 AM Mostra o teu código. Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
hypz Posted June 15, 2012 at 09:48 AM Author Report Share #463002 Posted June 15, 2012 at 09:48 AM (edited) Dim dr As DialogResult dr = MsgBox("Deseja Fechar ?", MessageBoxButtons.YesNo, "Fechar") If DialogResult.Yes Then My.Settings.Checked = True My.Settings.Selected = TextBox1.Text My.Settings.Selected1 = TextBox2.Text My.Settings.Text = TextBox1.Text My.Settings.Text1 = TextBox2.Text My.Settings.Clicked = True ElseIf DialogResult.No Then My.Settings.Checked = False My.Settings.Clicked = False e.Cancel = True Me.Show() End If O Me.Show foi uma tentativa de por aquilo a não fechar. Está aqui. Edited June 15, 2012 at 09:51 AM by Caça Link to comment Share on other sites More sharing options...
Caça Posted June 15, 2012 at 09:52 AM Report Share #463003 Posted June 15, 2012 at 09:52 AM Não estás a igualar o teu dr, tens de fazer assim If dr = DialogResult.Yes Then '... ElseIf dr =DialogResult.No Then '... End If Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
hypz Posted June 15, 2012 at 10:05 AM Author Report Share #463006 Posted June 15, 2012 at 10:05 AM Mesmo, que nabo.. Ainda precisava de ajuda no outro tópico da query 🙂 Obrigado. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now