Question

  • Creator
    Topic
  • #3937429

    Printer.PaintPicture pic.Picture, 0, 0, pic.Width, pic.Height

    by bkandler ·

    This ought to be trivial. I have a large picturebox filled with lines and fills in twips and I need to break it into page size pieces. There are many samples that are based on the above statement. But I get “invalid picture”. Trying variations the only one that doesn’t error is

    Printer.PaintPicture pic.Image, 0, 0, pic.Width, pic.Height
    But it produces nothing!

    Else where in my code, I have

    If SetupPrinter(Me) Then
    pic.Picture = pic.Image
    Printer.PaintPicture pic.Picture, Printer.CurrentX, Printer.CurrentY
    Printer.EndDoc
    End If

    that works grand. But in this case:

    pic.Picture = pic.Image

    Erases the picturebox.

You are posting a reply to: Printer.PaintPicture pic.Picture, 0, 0, pic.Width, pic.Height

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Answers

  • Author
    Replies
    • #3940000
      Avatar photo

      Need more information

      by birdmantd ·

      In reply to Printer.PaintPicture pic.Picture, 0, 0, pic.Width, pic.Height

      What is the application/program used? I cannot guess what you are using or what the issue is.

      • #3939999

        paintpicture failure

        by bkandler ·

        In reply to Need more information

        it’s a home grown vb6 app with over 5000 users.

        in the same program this works:

        cmdColor.picSide.Picture = cmdColor.picSide.Image
        Printer.PaintPicture cmdColor.picSide.Picture, Printer.TextWidth(ini.LinePfx), Printer.CurrentY

        but this does not

        DisplayRingTop Me.pic, lyr, True
        DrawCenterMarks Me.pic, ini.CenterJigPost / 2, 0
        Me.pic.Picture = Me.pic.Image
        Printer.PaintPicture Me.pic.Picture, 0, 0, pic.Width, pic.Height

        The setup for both is the same unit (inches) and scalemode settings save sizes. DisplayRingTop actually used in both places. I can send pics and more code.

        • #3939975

          paintpicture failure

          by bkandler ·

          In reply to paintpicture failure

          pared down to the minimum, this prints an empty page. GO shows up in pic:

          pic.Print “GO”
          Printer.PaintPicture Me.pic.Image, 0, 0, pic.Width, pic.Height
          Printer.EndDoc

          and this results in invalid picture

          pic.Print “GO”
          pic.Picture = pic.Image
          Printer.PaintPicture Me.pic.Picture, 0, 0, pic.Width, pic.Height
          Printer.EndDoc

          In other places, this works:

          cmdColor.picSide.Picture = cmdColor.picSide.Image ‘capture image
          Printer.PaintPicture cmdColor.picSide.Picture, Printer.TextWidth(ini.LinePfx), Printer.CurrentY ‘print it

    • #3939974
      Avatar photo

      I’m too late.

      by rproffitt ·

      In reply to Printer.PaintPicture pic.Picture, 0, 0, pic.Width, pic.Height

      Last year our office finally did the end of support for a few VB6 apps. It was time for a few reasons but mostly because the setup was getting harder and harder and the client didn’t agree to pay for continued work or conversion to something more current.

      So my access to VB6 is no more. I’ve also found that the other forums have all but gone silent on VB6 discussions.

      I know folk want to keep going but here, it’s dead Jim.

      Maybe you can outsource this on Upwork or such?

    • #3939917

      it’s a home grown vb6 app with over 5000 users.

      by lineardxca ·

      In reply to Printer.PaintPicture pic.Picture, 0, 0, pic.Width, pic.Height

      Yes I’m sure its that

    • #3939002

      by rofa

      by rofamarja ·

      In reply to Printer.PaintPicture pic.Picture, 0, 0, pic.Width, pic.Height

      pared down to the minimum, this prints an empty page.

Viewing 3 reply threads