X-Received: by 10.129.120.196 with SMTP id t187mr1105569ywc.119.1500454501930; Wed, 19 Jul 2017 01:55:01 -0700 (PDT) X-Received: by 10.31.50.145 with SMTP id y139mr4058vky.17.1500454501846; Wed, 19 Jul 2017 01:55:01 -0700 (PDT) Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!14no357660qtn.1!news-out.google.com!g57ni42qtg.1!nntp.google.com!14no357654qtn.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: it.comp.lang.visual-basic Date: Wed, 19 Jul 2017 01:55:01 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.215.169.20; posting-account=yvxj_woAAABxrxq8XihQzP-tWUWpycQc NNTP-Posting-Host: 213.215.169.20 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Scavalcare un evento vb.net From: Marco75 Injection-Date: Wed, 19 Jul 2017 08:55:01 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: csiph.com it.comp.lang.visual-basic:19097 Ciao, nella mia app creata con Visual Studio 2010, su chiusura della maschera pri= ncipale (Home) ho inserito un messaggio: Private Sub Home_FormClosing(ByVal sender As Object, ByVal e As System.Wind= ows.Forms.FormClosingEventArgs) Handles Me.FormClosing If (MessageBox.Show("Sto per chiudere l'applicazione!" & vbNewLine = & vbNewLine _ & "Confermi?", " CHIUSURA APPLICAZIONE", Mes= sageBoxButtons.YesNo, MessageBoxIcon.Warning) =3D Windows.Forms.DialogResul= t.No) Then e.Cancel =3D True MessageBox.Show("Chiusura applicazione interrotta...", "CHIUSUR= A APPLICAZIONE", MessageBoxButtons.OK, MessageBoxIcon.Information) Else =20 End If End Sub In un caso avrei bisogno di non scatenare l'evento form closing, =C3=A8 pos= sibile? Ho una 2=C2=B0 maschera nella quale cliccando un pulsante voglio far chiude= re l'app ma ovviamente la chiusura della form Home mi fa partire la MsgBox. Ho provato cos=C3=AC: Private Sub btnAggiorna_Click(ByVal sender As System.Object, ByVal e As Sys= tem.EventArgs) Handles btnAggiorna.Click RemoveHandler Home.FormClosing, AddressOf btnAggiorna_Click Application.Close() End Sub il messaggio inserito in Home.FormClosing compare comunque soluzioni? grazie Marco