/t like in calmc

P

Pascal

hello
how to append "tab" in a text like in calmc like this :
chaîne1 = "two tabulations\t\tin a string !"i tried vbtab and chr(9)
without success. chaîne1 = "two tabulations " & chr(9) & chr(9) "in a string
!"thanks
http://www.scalpa.info
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Pascal said:
hello
how to append "tab" in a text like in calmc like this :
chaîne1 = "two tabulations\t\tin a string !"i tried vbtab and chr(9)
without success. chaîne1 = "two tabulations " & chr(9) & chr(9) "in a string
!"thanks
http://www.scalpa.info

Either vbTab or Chr(9) will work. Why do you think that there are no tab
characters in the string?
 
H

Herfried K. Wagner [MVP]

Göran Andersson said:
Either vbTab or Chr(9) will work. Why do you think that there are no tab
characters in the string?

I agree, although I prefer 'ControlChars.Tab' :).
 
P

Pascal

hello
i used the code found here :
http://vb-helper.com/howto_net_print_long_text.html to print paragraph.
here is my code :
Private Sub AperçuAvantImpressionToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AperçuAvantImpressionToolStripMenuItem.Click

m_Paragraphs = New Collection

Dim mtEspaces As String = Chr(9)

For i As Integer = 1 To 20

m_Paragraphs.Add(New ParagraphInfo(11, i.ToString + ") " +
NbEnRomain(CShort(utility.GenNombre(Min, Max))) + " = .......... " +
mtEspaces + NbEnRomain(CShort(utility.GenNombre(Min, Max))) + " = ..........
"))

m_Paragraphs.Add(New ParagraphInfo(9, vbCrLf))

Next

m_Paragraphs.Add(New ParagraphInfo(9, vbCrLf))

m_Paragraphs.Add(New ParagraphInfo(9, " " + Now + " " +
"|#|---------------:-: SC@LPA PRODUCTION :-:---------------|#|"))

' Make a PrintDocument and attach it to the PrintPreview dialog.

dlgPrintPreview.Document = PreparePrintDocument()

' Preview.

dlgPrintPreview.WindowState = FormWindowState.Maximized

dlgPrintPreview.ShowDialog()

End Sub

But during the preview the strings appear without tabulation......

http://www.scalpa.info
 
P

Pascal

oops i post in the wrong place...
hello

In fact the purpose of the code is to print some strings that i don't know
the length before. But i want them to appears in two or three columns. So i
thought that i could with the code (see the link in previous post) using
vbtab. But vbtab has no effect to the string !!!!
Hope this is clearer...
thanks for your help
pascal

--
bonjour


http://www.scalpa.info
Pascal said:
hello
i used the code found here :
http://vb-helper.com/howto_net_print_long_text.html to print paragraph.
here is my code :
Private Sub AperçuAvantImpressionToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AperçuAvantImpressionToolStripMenuItem.Click

m_Paragraphs = New Collection

Dim mtEspaces As String = Chr(9)

For i As Integer = 1 To 20

m_Paragraphs.Add(New ParagraphInfo(11, i.ToString + ") " +
NbEnRomain(CShort(utility.GenNombre(Min, Max))) + " = .......... " +
mtEspaces + NbEnRomain(CShort(utility.GenNombre(Min, Max))) + " =
.......... "))

m_Paragraphs.Add(New ParagraphInfo(9, vbCrLf))

Next

m_Paragraphs.Add(New ParagraphInfo(9, vbCrLf))

m_Paragraphs.Add(New ParagraphInfo(9, " " + Now + " " +
"|#|---------------:-: SC@LPA PRODUCTION :-:---------------|#|"))

' Make a PrintDocument and attach it to the PrintPreview dialog.

dlgPrintPreview.Document = PreparePrintDocument()

' Preview.

dlgPrintPreview.WindowState = FormWindowState.Maximized

dlgPrintPreview.ShowDialog()

End Sub

But during the preview the strings appear without tabulation......

http://www.scalpa.info
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top