Solved

about printing a form or a picture

Posted on 2000-04-04
6
160 Views
Last Modified: 2011-04-14
How can I print a 2 picture, or image or form in the same page on the printer?

Comment je fais pour imprimer 2 picture, image ou form sur la même page lorsque je l'envoie a l'imprimante?
0
Comment
Question by:weaponx_logan
6 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 2685376
You can't using FormPrint

You have to set up the printing yourself.

You can use PrintPicture to print the current form to the page. Then you use CurrentX/Y to position the cursor down the page and do it again.

M
0
 
LVL 3

Expert Comment

by:paulstamp
ID: 2687051
I think that should be PaintPicture, not PrintPicture Mark2150
0
 

Author Comment

by:weaponx_logan
ID: 2687064
I search for your PrintPicture function and i don't find it.
Is it a printer function or a picture function?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:weaponx_logan
ID: 2687090
ha okay, it's PaintPicture!
thanx paulstamp!
0
 
LVL 14

Accepted Solution

by:
Matti earned 50 total points
ID: 2687156
Hi!

Private Sub Command1_Click()
Dim Px&, Py&, Px1&, Py1&, Px2&, Py2&
Form1.ScaleMode = 1
Printer.ScaleMode = 1
Py = Printer.Width - 1 'do not send it to nextpage
Px = Printer.Height - 1
Px1 = Picture1.Left 'place to print first
Py1 = Picture1.Top - Picture1.Height
Px2 = Picture2.Left 'place to print first
Py2 = Picture2.Top - Picture2.Height
If Py < Py2 Then GoTo toolarge
If Px < Px2 Then GoTo toolarge
If Py < Py1 Then GoTo toolarge
If Px < Px1 Then GoTo toolarge
Printer.CurrentX = 0 'move printer poiter to top left
Printer.CurrentY = 0
Printer.PaintPicture Picture1.Picture, Px1, Py1, Picture1.Width, Picture1.Height, , , , , vbMergeCopy

Printer.PaintPicture Picture2.Picture, Px2, Py2, Picture2.Width, Picture2.Height, , , , , vbMergeCopy
'Send it
Printer.EndDoc

Exit Sub
toolarge:
MsgBox "Hups it goes to next page."
'Here is the error system too large form / too small default print area.

'One commandbutton Two pictuere boxes on a form

'Note I only used for 15min on one print for this, check if the scale values are correct the X and Y's may be swapped

End Sub



Matti
0
 
LVL 12

Expert Comment

by:mark2150
ID: 2708125
Doesn't matter what it's called - it still don't work!

M
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now