Solved

about printing a form or a picture

Posted on 2000-04-04
6
159 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

746 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

9 Experts available now in Live!

Get 1:1 Help Now