|
-
Jun 15th, 2002, 05:27 AM
#1
Thread Starter
Addicted Member
Printing Help?
Hi,
How can i using a commondialog control ask the user what printer they want to use and how many copies etc, and then print all the text in a text box to that printer??
Many thanks!
-
Jun 15th, 2002, 06:33 AM
#2
Junior Member
hope this helps
after you put the dlgprint on your form put a command button on your form with the followong code. hope this helps you out, not sure if its what you wanted.
VB Code:
Private Sub Command8_Click()
dlgprint.CancelError = True
On Error GoTo ErrHandler
dlgprint.ShowPrinter ' the following sets properties
Printer.Print
Printer.ScaleMode = 5
Printer.CurrentX = 1
Printer.CurrentY = 1
Printer.Font = "Arial"
Printer.FontSize = 8
Printer.Font.Bold = False
Printer.Font.Italic = False
Dim old_width As Integer
Printer.Print Tab(5):text1.text 'starts print in from the edge 5 spaces then prints contents of text1.
Printer.Print "" 'creates a blank line
Printer.Print Tab(7); text2.text ' prints 7 spaces from last print text2 contents
Printer.EndDoc
ErrHandler:
Exit Sub
End Sub
-
Jun 16th, 2002, 05:19 AM
#3
Thread Starter
Addicted Member
Thanks rjcarroll!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|