So, I have a C1TrueDBGrid in my form (which is a ComponentOne control), and I give the user the ability to print the contents of the grid.
When printing, I include a headline with some text. This is my printable code:
Dim dlgPrint As New PrintDialog
dlgPrint.ShowDialog()
dgvList.PrintInfo.PrintEmptyGrid = False
dgvList.PrintInfo.PageHeader = txtDirectory.Text & Environment.NewLine & "Search Term: " & txtSearch.Text & Environment.NewLine
dgvList.PrintInfo.PageSettings.Landscape = True
dgvList.PrintInfo.WrapText = C1.Win.C1TrueDBGrid.PrintInfo.WrapTextEnum.Wrap
dgvList.PrintInfo.RepeatColumnHeaders = True
dgvList.PrintInfo.Print(dlgPrint.PrinterSettings)
dlgPrint.Dispose()
txtDirectory.Text, as I am sure you can imagine, contains a directory path that includes backslashes \. What was actually printed turned \ S instances into 1.
For example: txtDirectory.Text = \\ Server02 \ Users \ Me \ J \ Star
which was printed = \ 1erver02 \ Users \ Me \ J1tar
"\ S" "1" - ? -, , ? , ?
!