Description: Hi All,
This post will help you in sending the contents of a "Rich Text box" to printer with exact contents printed.
The basic idea is framing a print document object using the contents of the textbox and sending to the printer object.
I have attached the source code and document which details the procedures in detail.
Hope this helps.
With Regards,
M. Gangadhar
File list (Check if you may need any files):
RichtextBoxprinting
...................\PrintRichTextBox.doc
...................\RichTextBoxEx-C#
...................\................\RTBExCs
...................\................\.......\AssemblyInfo.cs
...................\................\.......\RichTextBoxEx.cs
...................\................\.......\RTBExCs.csproj
...................\................\.......\RTBExCs.csproj.user
...................\................\.......\RTBExCs.sln
...................\................\SampleCs
...................\................\........\AssemblyInfo.cs
...................\................\........\SampleCs.csproj
...................\................\........\SampleCs.csproj.user
...................\................\........\SampleCs.sln
...................\................\........\SampleFrame.cs
...................\................\........\SampleFrame.resx
...................\RichTextBoxEx-VB
...................\................\RTBExVB
...................\................\.......\AssemblyInfo.vb
...................\................\.......\bin
...................\................\.......\...\RTBExVB.dll
...................\................\.......\obj
...................\................\.......\...\Debug
...................\................\.......\...\.....\temp
...................\................\.......\...\.....\TempPE
...................\................\.......\...\Release
...................\................\.......\...\.......\RichTextBoxEx.resources
...................\................\.......\...\.......\RTBExVB.dll
...................\................\.......\...\.......\temp
...................\................\.......\...\.......\TempPE
...................\................\.......\RichTextBoxEx.resx
...................\................\.......\RichTextBoxEx.vb
...................\................\.......\RTBExVB.sln
...................\................\.......\RTBExVB.vbproj
...................\................\.......\RTBExVB.vbproj.user
...................\................\SampleVB
...................\................\........\AssemblyInfo.vb
...................\................\........\bin
...................\................\........\...\RTBExVB.dll
...................\................\........\Form3.resx
...................\................\........\Form3.vb
...................\................\........\obj
...................\................\........\...\Debug
...................\................\........\...\.....\temp
...................\................\........\...\.....\TempPE
...................\................\........\...\Release
...................\................\........\...\.......\SampleVB.Form3.resources
...................\................\........\...\.......\SampleVB.SampleFrame.resources
...................\................\........\...\.......\temp
...................\................\........\...\.......\TempPE
...................\................\........\SampleFrame.resx
...................\................\........\SampleFrame.vb
...................\................\........\SampleVB.sln
...................\................\........\SampleVB.sln.old
...................\................\........\SampleVB.vbproj
...................\................\........\SampleVB.vbproj.user