CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: About PrintForm

  1. #1
    Join Date
    Jan 2001
    Location
    L.A California
    Posts
    152

    About PrintForm

    I generated VB code like list below.
    But the result is cut at the middle of the page.
    I'm wandering that reason.
    Let me know the reason.
    Thank you.

    ------------------------------------------------
    Private Sub MenuFilePrint_Click()
    dlgPrint.Flags = cdlPDReturnDC+cdlPDNoPageNums
    If RichTextBox1.SelLength=0 Then
    dlgPrint.Flags=dlgPrint.Flags+cdlPDAllPages
    Else
    dlgPrint.Flags=dlgPrint.Flags+cdlPDSelection
    End If

    dlgPrint.PrinterDefault = True
    dlgPrint.Flags = cdlPDPrintSetup
    dlgPrint.Orientation = cdlPortrait
    dlgPrint.CancelError = True
    dlgPrint.FontSize = 14
    dlgPrint.FontName = "Tahoma"
    dlgPrint.ShowPrinter
    PrintQual = 300
    FormReport_Revision1.PrintForm

    End Sub
    ------------------------------------------------

    DYJeong

  2. #2
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    42

    Re: About PrintForm

    Your problem happens could be due to the Form size. I think what you have to do is open your Form (design time) and drag the Form (which to be printed) to a bigger size. The PrintForm command will only print exactly your "design time" Form size. Therefore, if your design time Form is small, you will get only half of the page! Try it!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured