• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

VB6 Printing.

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    VB6 Printing.

    I'm writing a little bit of code to print some barcodes and events for Mrs WC2's snake project.. Everything works as expected accept from one thing.

    Everything is printing in Italics.

    SAMPLE CODE

    Printer.FontName = "Arial"
    Printer.FontSize = 36
    Printer.Print txt_sname.Text

    I tired adding the line

    printer.fontitalics=false

    But this made no difference at all

    Any advice
    Throw them to the lions - WC2 5.4

    #2
    Try:
    1) another font (careful when typing name - if its wrong the thing may default to something else)
    2) check text, maybe some letters there interpreted as making it italic - print some plain text assigned directly to the variable ie: "test"

    Comment


      #3
      Originally posted by AtW View Post
      Try:
      1) another font (careful when typing name - if its wrong the thing may default to something else)
      2) check text, maybe some letters there interpreted as making it italic - print some plain text assigned directly to the variable ie: "test"
      Thanks Alex,

      tried all of that and still the same.

      Also created some new code away from the app with the code :

      Printer.FontItalic = False
      Printer.FontName = "Arial"
      Printer.FontSize = 36
      Printer.Print Text1.Text
      Printer.EndDoc

      Still prints in Italics

      Tried to a different printer.. No Joy
      Throw them to the lions - WC2 5.4

      Comment


        #4
        VB6 help says always change the font name before the style so that might be why your 2nd bit of code doesn't work but I doubt it. Otherwise is there anything odd in your project references? You should probably only have the three basic vb libs for that.
        bloggoth

        If everything isn't black and white, I say, 'Why the hell not?'
        John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

        Comment


          #5
          Try Courier font and see if you get italics again.

          Comment


            #6
            Thanks all.

            Problem was ..... Arial font corrupt.. VB was defaulting to arial italics.
            Throw them to the lions - WC2 5.4

            Comment


              #7
              I did suggest it as #1:

              1) another font (careful when typing name - if its wrong the thing may default to something else)

              And you said you tried it

              Comment


                #8
                Originally posted by AtW View Post
                I did suggest it as #1:

                1) another font (careful when typing name - if its wrong the thing may default to something else)

                And you said you tried it


                I did.. But I spelt it wrong
                Throw them to the lions - WC2 5.4

                Comment


                  #9
                  Originally posted by wc2 View Post


                  I did.. But I spelt it wrong
                  "(careful when typing name - if its wrong the thing may default to something else)"

                  Comment

                  Working...
                  X