Question Saving a chosen font in a richtextbox & going to a line in the richtextbox

DukeMeister44

New member
Joined
Sep 14, 2020
Messages
3
Programming Experience
1-3
Hi,

I've been trying to figure out how to save a selected font such as Tahoma with the font dialog for my notepad clone and as well as going a selected line in a file with a number, for example; if there are 42 lines in a text file but I want to go to line 17, it should jump to that line then tell me which line I am now on when I've entered the number in the text with a filter using Regular Expressions in the form code.

For font dialog
Dim fnt_dlg As New FontDialog fnt_dlg.ShowDialog() fnt_dlg.ShowColor = True fnt_dlg.AllowVectorFonts = True fnt_dlg.ShowEffects = True RichTextBox1.Font = fnt_dlg.Font

This code for counting lines in file. (This I want to change for going to specific lines in the textbox with a number)
Dim lines As Integer = RichTextBox1.Lines.Count If lines = 0 Then MsgBox("This file has no lines in it.") Else MsgBox("This file has " & lines - 1 & " lines in file.") End If

Due, my own failure to back up my projects, I lost all my projects and vital functions in said projects I could recycle and re-use in other projects, that including going to specific lines in textbox with a number when called for and so-on.
 
Last edited:
Top Bottom