well im having a bit of trouble doing this..... whenever i try, the save file dialog comes up when i hit No and same when I hit Cancel....
please help me...Code:If My.Settings.SaveSTS = False Then MsgBox("Do you wish to save your changes?", MsgBoxStyle.YesNoCancel) If MsgBoxResult.Yes Then If My.Settings.OnceSaved = True Then Dim writer As New IO.StreamWriter(SaveName) writer.Write(txtEdit.Text) writer.Close() Else If sfdHTML.ShowDialog = DialogResult.OK Then SaveName = sfdHTML.FileName Dim writer As New IO.StreamWriter(SaveName) writer.Write(txtEdit.Text) writer.Close() Me.Text = sfdHTML.FileName lblFileName.Text = sfdHTML.FileName End If End If ElseIf MsgBoxResult.No Then e.Cancel = True Me.Close() ElseIf MsgBoxResult.Cancel Then e.Cancel = False End If Else e.Cancel = False Me.Close() End If




Reply With Quote
