Results 1 to 5 of 5

Thread: Printing Problem!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    3

    Printing Problem!

    Hello,
    I want to print Form5 in my project but printing operation is slow!
    I used the following code:
    .
    .
    .

    Form5.PrintForm
    .
    .
    .

    Please help me.
    Thank's.

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Printing Problem!

    Welcome to the Forum

    How about printing the Components values of that Form, opposed to the Form (face) itself?

    Ie printing off all the TextBox's.Text etc.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    3

    Printing Operation is slow!

    Hi.
    I have in my Project a MSFlexGride ,two Labels(in Form5) and want to print Form5.
    Printing operation is slow and MSFlexGride's Cells in my print are black!
    I used the following code in a CommandButton :
    .
    .
    .
    Form5.PrintForm
    .
    .
    .
    Do i can print Form5 in my project by PrintForm method?
    Thank you.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Printing Operation is slow!

    Instead of double posting, continue on your previous thread.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Printing Operation is slow!

    Quote Originally Posted by Joacim Andersson
    Instead of double posting, continue on your previous thread.
    In the future, please follow this advice.

    Duplicate threads merged.
    Quote Originally Posted by HFlash
    I have in my Project a MSFlexGride ,two Labels(in Form5) and want to print Form5.
    Printing operation is slow and MSFlexGride's Cells in my print are black!
    I used the following code in a CommandButton :
    .
    .
    .
    Form5.PrintForm
    .
    .
    .
    Do i can print Form5 in my project by PrintForm method?
    PrintForm has issues with a number of controls with the Flexgrid being one of them. Try this
    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
    4. ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    5.  
    6. Private Const VK_MENU As Byte = &H12
    7. Private Const VK_SNAPSHOT As Byte = &H2C
    8. Private Const KEYEVENTF_KEYUP = &H2
    9.  
    10. Private Sub cmdPrintForm_Click()
    11. Dim lWidth As Long, lHeight As Long
    12.     Clipboard.Clear
    13.     Call keybd_event(VK_MENU, 0, 0, 0)
    14.     Call keybd_event(VK_SNAPSHOT, 0, 0, 0)
    15.     DoEvents
    16.     Call keybd_event(VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0)
    17.     Call keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0)
    18.     Printer.Print
    19.     If Width > Printer.ScaleWidth Then
    20.         lWidth = Printer.ScaleWidth
    21.         lHeight = (Printer.ScaleWidth / Width) * Height
    22.     Else
    23.         lWidth = Width
    24.         lHeight = Height
    25.     End If
    26.     Printer.PaintPicture Clipboard.GetData, 0, 0, lWidth, lHeight
    27.     Printer.EndDoc
    28. End Sub

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