Results 1 to 4 of 4

Thread: [RESOLVED] Need help to show adjustable layout of invoice in a picturebox in vb6

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2013
    Posts
    66

    Resolved [RESOLVED] Need help to show adjustable layout of invoice in a picturebox in vb6

    I have a invoice/receipt to print from my vb6 form. I need to show its preview in a picturebox with contents. User must be able to change the x,y (currentx,currenty of printer object) of the position of details to print. How can this be made possible? ThankU

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Need help to show adjustable layout of invoice in a picturebox in vb6

    each print area should be in separate picture boxes, then they can be moved and resized in relation to the background (page size) picturebox
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2013
    Posts
    66

    Re: Need help to show adjustable layout of invoice in a picturebox in vb6

    There would only be text. Do I need separate pictureboxes for that?

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,255

    Re: Need help to show adjustable layout of invoice in a picturebox in vb6

    Quote Originally Posted by BlueFox View Post
    There would only be text. Do I need separate pictureboxes for that?
    No - just a simple wrapper-function for the Text-Output is enough:

    Code:
    Sub TextOutOn(Canvas As PictureBox, sText As String, x, y)
        Canvas.CurrentX = x
        Canvas.CurrentY = y
        Canvas.Print sText
    End Sub
    Olaf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width