Results 1 to 5 of 5

Thread: I am going to try this once more.....

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    terra incoginta
    Posts
    17

    Unhappy I am going to try this once more.....

    As you may or may not know, or care. I have been working on
    printing pictures. I finally used a template form with a picbox.
    I can now print the pictures four to a page, however I need to
    place the picID number at the bottom center of each picture. In
    the image control I could use a label with backcolor set to black
    so white numbers would show no matter the color on the
    picture. Does anyone have any suggestions for accomplishing
    the same thing in a picbox? I cannot get the label to work, from
    what I have been reading the picbox and label occupy the same
    layer on the form so it will not be possible to bring the label to
    the front.

    I am not asking for someone to code this.

    I could use some ideas on where to look next.

    Thanks in advance for any assistance.

  2. #2
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Hi
    probably the simplest way is to print the number directly on the picture box and maybe use a background box if u prefer. eg
    VB Code:
    1. Private Sub Command1_Click()
    2.     Dim ItemToPrint As String
    3.     Dim lWidth As Single
    4.     Dim lHeight As Single
    5.     ItemToPrint = "No. 1"
    6.     With Picture1
    7.         lWidth = .TextWidth(ItemToPrint)
    8.         lHeight = .TextHeight(ItemToPrint)
    9.         .Cls
    10.         Picture1.Line ((.ScaleWidth - lWidth) \ 2 - 30, .ScaleHeight - lHeight - 40)-Step(lWidth + 60, lHeight + 40), vbWhite, BF
    11.         .CurrentX = (.ScaleWidth - lWidth) \ 2
    12.         .CurrentY = .ScaleHeight - lHeight - 20
    13.         Picture1.Print ItemToPrint
    14.     End With
    15. End Sub
    Regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    terra incoginta
    Posts
    17

    another question

    what unit of measurement are you using?

    some more specifics:

    I have one form measuring 7 inches by 10 inches with one picbox
    and 4 pics. There is no space between pics. The pics measure
    3 1/2 inches by 5 inches each.
    I need one of your wonderful little boxes in the bottom center of each one.

    I think, no I am sure I need some help with the math.

    I confess I do not understand the coordinate system, but that's
    not the only thing I don't understand.

    Thanks for answering.

    Rick

  4. #4
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Hi
    I didnt change any scaling on the picture box and u dont need any maths cos the code works out the bottom middle position for the box and text regardless of the size of the picture box or the size of the message.
    regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    terra incoginta
    Posts
    17

    Talking Hi Stuart

    Thanks for your help

    I really appreciate it. I finally got the hard part of this done.
    Now all I need to do is finish testing on the printers at work,
    polish up the code a bit and start on another project that is
    over my head....lol

    Again thanks for the help.. maybe I can return the favor sometime

    Rick

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