Solved

about printing a form or a picture

Posted on 2000-04-04
6
161 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

810 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