closing

M

Maarten

hi all,



Private Sub Form1_Closing(ByVal sender As System.Object, ByVal e As
CancelEventArgs) Handles MyBase.Closing

If MsgBox("Really close?", MsgBoxStyle.YesNo Or MsgBoxStyle.Question) =
MsgBoxResult.No Then

e.Cancel = True

End If

End Sub

Private Sub MenuItem28_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem28.Click

Form1_Closing( ?;? )

End Sub





how can i call the form1_closing sub from sub menuitem28_click



regards Maarten
 
H

Herfried K. Wagner [MVP]

Maarten said:
Private Sub Form1_Closing(ByVal sender As System.Object, ByVal e As
CancelEventArgs) Handles MyBase.Closing
If MsgBox("Really close?", MsgBoxStyle.YesNo Or MsgBoxStyle.Question) =
MsgBoxResult.No Then
e.Cancel = True
End If
End Sub

Private Sub MenuItem28_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem28.Click
Form1_Closing( ?;? )
End Sub

how can i call the form1_closing sub from sub menuitem28_click

'Me.Close()'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top