|
-
Dec 1st, 2001, 03:48 AM
#1
Thread Starter
Junior Member
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.
-
Dec 1st, 2001, 04:28 AM
#2
PowerPoster
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:
Private Sub Command1_Click()
Dim ItemToPrint As String
Dim lWidth As Single
Dim lHeight As Single
ItemToPrint = "No. 1"
With Picture1
lWidth = .TextWidth(ItemToPrint)
lHeight = .TextHeight(ItemToPrint)
.Cls
Picture1.Line ((.ScaleWidth - lWidth) \ 2 - 30, .ScaleHeight - lHeight - 40)-Step(lWidth + 60, lHeight + 40), vbWhite, BF
.CurrentX = (.ScaleWidth - lWidth) \ 2
.CurrentY = .ScaleHeight - lHeight - 20
Picture1.Print ItemToPrint
End With
End Sub
Regards
Stuart
-
Dec 1st, 2001, 05:06 AM
#3
Thread Starter
Junior Member
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
-
Dec 1st, 2001, 07:26 AM
#4
PowerPoster
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
-
Dec 2nd, 2001, 02:41 AM
#5
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|