Private Sub MainForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If My.Settings.My_First_Build = True Then
If OptionsForm.AutoSaveallOnExitCKB.CheckState = CheckState.Checked Then
If Tab4RichTextBoxPrintCtrl.Modified = True Then
SaveAsMenuItem1_Click(Me, e)
Threading.Thread.Sleep(100)
Else
MessageBox.Show("Not modified")
End If
If Tab5RichTextBoxPrintCtrl.Modified = True Then
SaveAsMenuItem2_Click(Me, e)
Threading.Thread.Sleep(100)
Else
End If
If Tab6RichTextBoxPrintCtrl.Modified = True Then
SaveAsMenuItem3_Click(Me, e)
Threading.Thread.Sleep(100)
Else
End If
If Tab7RichTextBoxPrintCtrl.Modified = True Then
SaveAsMenuItem4_Click(Me, e)
Threading.Thread.Sleep(100)
Else
End If
Else
End If
Else
' : My.Settings.My_First_Build = False
If OptionsForm.AutoSaveallOnExitCKB.CheckState = CheckState.Checked Then
'Try
Tab4RichTextBoxPrintCtrl.SaveFile(My.Settings.My_TabPage4_LastFile)
Tab5RichTextBoxPrintCtrl.SaveFile(My.Settings.My_TabPage5_LastFile)
Tab6RichTextBoxPrintCtrl.SaveFile(My.Settings.My_TabPage6_LastFile)
Tab7RichTextBoxPrintCtrl.SaveFile(My.Settings.My_TabPage7_LastFile)
If moonopentext.FileName = Nothing Then
Else
NotesViewerRichTextBoxCtrl.SaveFile(currentFile, RichTextBoxStreamType.PlainText)
End If
My.Settings.My_OpeniconLocation_Loco = OptionsForm.CustmIcon.FileName
My.Settings.Save()
' '
' End Try
Else
End If
End If
End Sub
WHY Wont it save if build true or false none works:(