On Close button?

  • Thread starter Thread starter Sheetal
  • Start date Start date
S

Sheetal

On close button of a compact framework screen, I want to end my
application. I wrote ...

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

Me.close()

End Sub

This only closes the screen. It does not end the application.
Can anybody please tell me what do I need to do in order to end the
application on the click of close button(on the upper right corner)
of a form?

Thanks,
Sheetal.
 
If this is a PocketPC application then the application should close by
itself if the "Ok" button is clicked on the main form. To make sure that you
get the "Ok" button instead of the "X" (smart minimize) set the MinimizeBox
property of the main form to false.
 
Thanks Tim. This works too. You are awesome.

Tim Wilson said:
If this is a PocketPC application then the application should close by
itself if the "Ok" button is clicked on the main form. To make sure that you
get the "Ok" button instead of the "X" (smart minimize) set the MinimizeBox
property of the main form to false.
 
Back
Top