borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (ExecWB giving error as Object not found when used in  vb dll)Next Topic (Custom Paper size) New Topic New Poll Post Reply
AndreaVB Forum : Printing : Help in printers
Poster Message
shikura
Level: Guest


icon Help in printers

i am developing my thesis this semester and i have problem in printing, not really in coding the alignments and etc. but my problem maybe a quite new to you,

i have one project and 3 forms are included with it.

Form1 has a command button labeled as Print Now.

Form2 has a labeled caption as hello im form 1.

Form3 has a labeled caption as hello im form 2.

now this is my problem, i have to print Form2 and Form3 when i click the command button in the Form1.

Private Sub Command1_Click()
Form2.PrintForm
Form3.PrintForm
End Sub

this code should do it right, but i have to print those two forms in a different printers

this printers can be connected by a USB cable or parallel ports.

it can also be same printers or etc.
can someone help me pls. it's very urgent cause my defense is on OCt 25, sorry for the short notice, any comments should help.

thank you so much.....

[Edited by shikura on 25-09-2003 at 07:12 AM GMT]

25-09-2003 at 07:11 AM
| Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Help in printers

This may be of some help


Private Sub Command1_Click()

    Dim x As Printer
    
    For Each x In Printers
    
        Debug.Print x.DeviceName

        If Printer.DeviceName = "HP LaserJet 5" Then

            Set Printer = x
    
            Me.PrintForm
            
        End If

    Next
    
End Sub


Steve  

[Edited by steve_w on 25-09-2003 at 09:57 AM GMT]

25-09-2003 at 09:53 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Printing : Help in printers
Previous Topic (ExecWB giving error as Object not found when used in  vb dll)Next Topic (Custom Paper size) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder