Right Alignment for book antiqua font for windows printing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neeta791
    New Member
    • May 2010
    • 1

    #1

    Right Alignment for book antiqua font for windows printing

    I am doing windows printing through VB6 and the font used is "Book Antiqua". It is number format and I want to right align it.

    I used Rset and format function but it is either fornatting to left or center.
  • Guido Geurs
    Recognized Expert Contributor
    • Oct 2009
    • 767

    #2
    Originally posted by neeta791
    Hello Averyone,

    Any body can solve my problem. I am doing windows printing through VB6 and the font used is "Book Antiqua". It is number format and I want to right align it.
    I used Rset and format function but it is either fornatting to left or center.

    so please provide me some solution for that.

    Thanks

    Neeta
    dear,

    I have the same results in a test project with the code=
    Code:
    Private Sub Command1_Click()
    Dim STR30 As String
       STR30 = "01234567890123456789012345678901234567890123"
       RSet STR30 = Text1.Text
       Text2.Text = STR30
    End Sub
    when I place a space in the string then I see that for the font "Book Antiqua", the text is "in the center" (not = centered !!!).

    when I use the font Fixedsys, then the text is on the right! (not = right allined !)

    Conclusion:
    - the font "Book Antiqua" has spaces of 1/2 char !
    - use a font in which the space = 1 char

    br,
    Attached Files

    Comment

    • Guido Geurs
      Recognized Expert Contributor
      • Oct 2009
      • 767

      #3
      dear,

      You can also calculate the required spaces and adapt each time the string-var. (see attachment).

      br,
      Attached Files

      Comment

      Working...