• Creator
  • #2266761

    printing in vb6


    by shahvez.alam ·

    im trying to print a form that have some lists
    containing data and the data in list is more than the hieght if the list. so i m not getting
    the printout of full data contained in the list.

All Answers

  • Author
    • #2578203


      by shahvez.alam ·

      In reply to printing in vb6


    • #2578006

      report format

      by john.a.wills ·

      In reply to printing in vb6

      It looks as though you need to redesign your report, but yur desrciption is a little hazy to me, at least at this time in the morning.

    • #2583591

      printing in vb6

      by gwl ·

      In reply to printing in vb6

      You will not be able to print using form printing. Rather use PRINTER.PRINT xxx where xxx is data, could be an item from the list or anything else. For example to print the contents of a list just create a for next loop and print each item and then proceed to the next item. With PRINTER.PRINT you can design where on the page you print using the various properties of the PRINTER object: = “Arial”
      Printer.Font.bold = true
      Printer.Font.italic = true
      Printer.Font.underline = false
      Printer.Font.SIZE = 14
      Printer.Font.charset = 128


      printer.print=”Hello World”

      • #3319957

        Printing problem on dot matrix printer

        by rnd ·

        In reply to printing in vb6

        Hello friends,
        I have some strange problem. While Debugging ,i can get correct printout(text & graph).But when i create .exe or setup, It prints from reverse direction i.e. text on left get printed on right.
        Please help me out.

        Thanking you in advance.


    • #2584560

      Re: Printing in VB 6

      by atklinger ·

      In reply to printing in vb6

      Hi there.

      First at all, I was trying to understand the question.

      If you want to print the form with the data included, the fisrt option it is to use Ctrl+Print Screen. You get All in your screen. The buffer is copied to your clipboard and you can paste this to a program like Paint or other and after that you can print it.

      The other thing I normally do, it is to print all the data on the ListBox Control and I do use the procedure below.

      To get that, you must have a CommonDialog Control in your form and of course a ListBox Control and also a CommandButton. The name of the Controls must be changed to those in your program or to your preference.

      Here is the Code:
      Private Sub cmdPrint_Click()

      ‘ Stablishing the CommomDialog Control
      With cdlKlinger
      .CancelError = False
      On Error GoTo ErrorHandler

      If (Err.Number = cdlCancel) Or (Err.Number = 32755) Or (cdlCancel = True) Then
      ‘ The User Canceled. Do nothing.
      GoTo ErrorHandler
      Exit Sub
      .Flags = (cdlPDReturnDC = True) And (cdlPDSelection = True) And _
      (cdlPDHidePrintToFile = True) And _
      (cdlPDDisablePrintToFile = True) And _
      (cdlPDSelection = True) And _
      (cdlPDAllPages = True)

      Printer.Orientation = .Orientation
      ‘ Printing in Printer

      Printer.Font.Bold = True
      Printer.Print vbTab & “Allowable Stress Design” & vbCrLf
      Printer.Print vbTab & Me.Caption & vbCrLf
      Printer.Print vbTab & Format(Now, ” mmm dd, yyyy (dddd)” & vbTab & “hh:mm:ss”) & vbCrLf
      Printer.Font.Bold = False


      With lstCase01
      For i = 0 To .ListCount
      Printer.Print vbTab & .List(.ListIndex + i)
      Next i
      End With

      End If
      End With

      Exit Sub
      MsgBox “Error: ” & Format$(Err.Number) & _
      “Selecting Printer:” & Printer.DeviceName & vbCrLf & vbCrLf & _
      Err.Description & vbCrLf & vbCrLf & _
      Err.Source, vbCritical, Me.Caption
      Exit Sub

      End Sub

      I hope that these ideas can help you.


Viewing 3 reply threads