/t like in calmc

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pascal

    #1

    /t like in calmc

    hello
    how to append "tab" in a text like in calmc like this :
    chaîne1 = "two tabulations\t\t in a string !"i tried vbtab and chr(9)
    without success. chaîne1 = "two tabulations " & chr(9) & chr(9) "in a string
    !"thanks
    Ressource pédagogique SC@LPA.



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

    #2
    Re: /t like in calmc

    Pascal wrote:
    hello
    how to append "tab" in a text like in calmc like this :
    chaîne1 = "two tabulations\t\t in a string !"i tried vbtab and chr(9)
    without success. chaîne1 = "two tabulations " & chr(9) & chr(9) "in a string
    !"thanks
    Ressource pédagogique SC@LPA.

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

    --
    Göran Andersson
    _____
    Göran Anderssons privata hemsida.

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: /t like in calmc

      "Göran Andersson" <guffa@guffa.co mschrieb:
      >how to append "tab" in a text like in calmc like this :
      > chaîne1 = "two tabulations\t\t in a string !"i tried vbtab and chr(9)
      >without success. chaîne1 = "two tabulations " & chr(9) & chr(9) "in a
      >string
      >
      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.T ab' :-).

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

      Comment

      • Pascal

        #4
        Re: /t like in calmc


        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çuAvantImpr essionToolStrip MenuItem_Click( ByVal sender As
        System.Object, ByVal e As System.EventArg s) Handles
        AperçuAvantImpr essionToolStrip MenuItem.Click

        m_Paragraphs = New Collection

        Dim mtEspaces As String = Chr(9)

        For i As Integer = 1 To 20

        m_Paragraphs.Ad d(New ParagraphInfo(1 1, i.ToString + ") " +
        NbEnRomain(CSho rt(utility.GenN ombre(Min, Max))) + " = .......... " +
        mtEspaces + NbEnRomain(CSho rt(utility.GenN ombre(Min, Max))) + " = ..........
        "))

        m_Paragraphs.Ad d(New ParagraphInfo(9 , vbCrLf))

        Next

        m_Paragraphs.Ad d(New ParagraphInfo(9 , vbCrLf))

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

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

        dlgPrintPreview .Document = PreparePrintDoc ument()

        ' Preview.

        dlgPrintPreview .WindowState = FormWindowState .Maximized

        dlgPrintPreview .ShowDialog()

        End Sub

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

        Ressource pédagogique SC@LPA.

        "Göran Andersson" <guffa@guffa.co ma écrit dans le message de news:
        exwI%23w2eHHA.4 188@TK2MSFTNGP0 2.phx.gbl...
        Pascal wrote:
        >hello
        >how to append "tab" in a text like in calmc like this :
        > chaîne1 = "two tabulations\t\t in 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?
        >
        --
        Göran Andersson
        _____
        http://www.guffa.com

        Comment

        • Pascal

          #5
          Re: /t like in calmc

          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


          Ressource pédagogique SC@LPA.

          "Pascal" <scalpanospm@wa nadoo.rfa écrit dans le message de news:
          461cd840$0$5084 $ba4acef3@news. orange.fr...
          >
          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çuAvantImpr essionToolStrip MenuItem_Click( ByVal sender As
          System.Object, ByVal e As System.EventArg s) Handles
          AperçuAvantImpr essionToolStrip MenuItem.Click
          >
          m_Paragraphs = New Collection
          >
          Dim mtEspaces As String = Chr(9)
          >
          For i As Integer = 1 To 20
          >
          m_Paragraphs.Ad d(New ParagraphInfo(1 1, i.ToString + ") " +
          NbEnRomain(CSho rt(utility.GenN ombre(Min, Max))) + " = .......... " +
          mtEspaces + NbEnRomain(CSho rt(utility.GenN ombre(Min, Max))) + " =
          .......... "))
          >
          m_Paragraphs.Ad d(New ParagraphInfo(9 , vbCrLf))
          >
          Next
          >
          m_Paragraphs.Ad d(New ParagraphInfo(9 , vbCrLf))
          >
          m_Paragraphs.Ad d(New ParagraphInfo(9 , " " + Now + " " +
          "|#|---------------:-: SC@LPA PRODUCTION :-:---------------|#|"))
          >
          ' Make a PrintDocument and attach it to the PrintPreview dialog.
          >
          dlgPrintPreview .Document = PreparePrintDoc ument()
          >
          ' Preview.
          >
          dlgPrintPreview .WindowState = FormWindowState .Maximized
          >
          dlgPrintPreview .ShowDialog()
          >
          End Sub
          >
          But during the preview the strings appear without tabulation..... .
          >
          Ressource pédagogique SC@LPA.

          "Göran Andersson" <guffa@guffa.co ma écrit dans le message de news:
          exwI%23w2eHHA.4 188@TK2MSFTNGP0 2.phx.gbl...
          >Pascal wrote:
          >>hello
          >>how to append "tab" in a text like in calmc like this :
          >> chaîne1 = "two tabulations\t\t in 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?
          >>
          >--
          >Göran Andersson
          >_____
          >http://www.guffa.com
          >
          >

          Comment

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

            #6
            Re: /t like in calmc

            Pascal wrote:
            hello
            i used the code found here :
            http://vb-helper.com/howto_net_print_long_text.html to print paragraph.
            here is my code :
            snip >8
            But during the preview the strings appear without tabulation..... .
            >
            The DrawString method doesn't support tab characters.

            --
            Göran Andersson
            _____
            Göran Anderssons privata hemsida.

            Comment

            • Pascal

              #7
              Re: /t like in calmc

              thanks for this information
              pascal


              Comment

              Working...