I have created a WinForms program with a DevExPress tabcontrol! What I cant figure out is when the user clicks the form close button or Exit and they have multiple files in multiple tabpages and havent save any of them yet how do I get the program to ask to save all of them? I have this so far but only saves one file!
Code:
Function SaveChanges() As Boolean
        Dim reply As MsgBoxResult
        reply = MsgBox("Have you saved your document(s)?", MsgBoxStyle.YesNo + vbQuestion)
        If reply = MsgBoxResult.Yes Then
            tc1.SelectedTabPage.Dispose()
            tc1.SelectedTabPageIndex = tc1.SelectedTabPageIndex - 1
        End If
        If reply = MsgBoxResult.No Then
            SaveToolStripMenuItem.PerformClick()
            tc1.SelectedTabPageIndex = tc1.SelectedTabPageIndex - 1
        End If
    End Function