Part:1 "How to Load data from a text file (RTF) to Richtextbox using Common Dialog Control and Richtextbox Control in Visual Basic"
and How to Clear Rich Text Box Control.
Link : https://youtu.be/32ITifBWJUI
Part:2 How to Save Richtextbox data to a file using Common dialog control in Visual basic
Link : https://youtu.be/oBJE3j2JJ1w
Part :3 How to Print Richtextbox content in visual basic and Print to a PDF file in visual basic .
Step by Step Tutorial
No step is skipped
Code:
Dim data As String
Dim filename As String
Private Sub clearbtn_Click()
RichTextBox1.Text = ""
End Sub
Private Sub loadbtn_Click()
opendialog.Filter = "Text Files (*.txt)|*.txt|RTf Files (*.rtf)|*.rtf|"
opendialog.ShowOpen
data = opendialog.filename
RichTextBox1.LoadFile (data)
End Sub
Private Sub printbtn_Click()
opendialog.CancelError = True
On Error GoTo CancelAlert
opendialog.Flags = cdlPDReturnDC + cdlPDNoPageNums
opendialog.ShowPrinter
RichTextBox1.SelPrint opendialog.hDC
Printer.EndDoc
CancelAlert:
Exit Sub
End Sub
Private Sub savebtn_Click()
opendialog.Filter = "Text Files (*.txt)|*.txt|RTf Files (*.rtf)|*.rtf|"
opendialog.ShowSave
filename = opendialog.filename
RichTextBox1.SaveFile filename, rtfText
End Sub
Thank you for sharing the information. Besides if you need experts for any kinds of problem with your PC/ Laptop the search for pc reparatur Frankfurt. ITFux24 can help you from to to bottom.
ReplyDeleteabv4396506
ReplyDeleteabq0945985
qx8728358
kp1216559
qr5531647
kt0008676
ve2405317
su7972597
qk2376311
acd1845340
xq4296810
abg5614133
th6524921
zw5705740
zw3626733
aag3558531
aac5220968
yb6735443
rg3143874
Interesting article! Thank you for sharing them! I hope you will continue to have similar posts to share with everyone.
ReplyDeleteInternet Recovery MAC