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




Reply With Quote