Heres my questions:
For my open file code i use the following. But it exceptions if you press Cancel. Not sure how to catch exception. I have been searching for a while.
Code: Select all
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
Dim File_Dialog As OpenFileDialog = New OpenFileDialog()
Dim File_Name As String
Dim File_Contents As String
File_Dialog.DefaultExt = "text"
File_Dialog.Title = "Open A Text File."
File_Dialog.ShowDialog()
File_Name = File_Dialog.FileName
File_Contents = My.Computer.FileSystem.ReadAllText(File_Name)
RichTextBox1.Text = File_Contents
End Sub
Code: Select all
RichTextBox1.Font.Bold = True
Property 'Bold' is 'ReadOnly'.
Any help would be nice
Thanks
-Andrew_b