I forgot some code, this fixes it : Private Sub SaveToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles SaveToolStripMenuItem.Click If ind = 1 Then SaveFileDialog1.FileName = url ind = 0 End If SaveFileDialog1.Title = "Save text Files" SaveFileDialog1.CheckFileExists = True SaveFileDialog1.CheckPathExists = True SaveFileDialog1.DefaultExt = "txt" SaveFileDialog1.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*" SaveFileDialog1.FilterIndex = 1 SaveFileDialog1.RestoreDirectory = True Try RichTextBox1.SaveFile(SaveFileDialog1.FileName, RichTextBoxStreamType.PlainText) Catch ex As Exception Call SaveAsToolStripMenuItem_Click(Me, e) End Try End Sub and find this: Private Sub DeleteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem.Click If RichTextBox1.SelectionLength > 0 Then RichTextBox1.Text = "" End If End Sub replace with this: Private Sub DeleteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem.Click Me.RichTextBox1.SelectedText = "" End Sub
@ethereal4111 ай бұрын
hey im getting an overload error with the openfiledialog sub? please could you explain?
@ethereal4111 ай бұрын
nevermind, i called openfiledialog.filenames instead of just filename.
@DavidWesleyBenner4 жыл бұрын
Fantastic! This is just what I was looking for to add to my current project! Thanks!!!!!
@utehstr4 жыл бұрын
You're welcome :-)
@TamiamiParkFlyers2 жыл бұрын
I'm getting the following error: Value of type 'System.IO.Stream' cannot be converted to 'System.IO.StreamReader'. Help!