Solved

about printing a form or a picture

Posted on 2000-04-04
6
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run code from text file in vb 1 86
VBA - If Bookmark = "XXBOOKMARKXX" then 15 50
Set WorkSheet  not Working 9 51
Macro problems with Excel file 6 22
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

735 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