0

i have a form with a listbox. the listbox can be edited (things added/deleted) and when the form is closed i would like the items in the listbox to be saved when the red "x" in the top right corner is clicked

any ideas?

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by Phasma
-1

Use the FormClosing event.

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        '// save code here.
    End Sub
0

Try putting the save code in the Forms FormClosing Event.

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
   'Do Save stuff
  End Sub
Votes + Comments
.did not down.vote .me to warn me.
0

Thanks for the down vote after I up voted yours> I will remember that for future posts I see of yours

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.