CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    457

    Question Printing A3 Size paper using printform Method .

    I have some of the Custom Documents. But these documents is little bigger than Even A3 Size paper. What I did I make A4 Size paper using Xerox Machine . and after scanning these documents . I have made A4 Size pictures using Photoshop.and finally I have included these Pictures in the SDI Forms.But these documents should be printed in Bigger than Even A3 Size paper .can you tell me How this Pages needs to be Printed on Needle Printer??.Does form1.PrintForm Supports A3 Size Paper or Much Bigger than A3 Size paper???????.Thx For Any Help !!!.

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,584

    Re: Printing A3 Size paper using printform Method .

    *
    Or, use ADOBE to change the size.
    Last edited by dglienna; September 29th, 2010 at 11:52 PM. Reason: removed 'Find someone with an A3 printer!' at Firoz request
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2012 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,475

    Re: Printing A3 Size paper using printform Method .

    By Needle printer do you mean a dot matrix printer?

    As far as I know print form does not scale so it will print related to the size of the form not the size of the paper. The printer determines what paper can be used.

    As suggested hook up a printer and test it though I am not sure why you are printing images printing formatted text is much faster and is fairly simple.
    Always use [code][/code] tags when posting code.

  4. #4
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    457

    Question Re: Printing A3 Size paper using printform Method .

    Sorry for Redirection anywhere else related with Font .When I Typing in MsWord . letter is Coming on Arabic letter .But when I type in Textbox which is Placed on The SDI Form .not Coming in Arabic Letter. Let me know some idea.Any help would be Highly appreciated .
    Attached Images  

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,475

    Re: Printing A3 Size paper using printform Method .

    You do know that you can print directly to a printer and set the printer fonts on the fly right? I have no idea why you are telling about the text box.
    Always use [code][/code] tags when posting code.

  6. #6
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,475

    Re: Printing A3 Size paper using printform Method .

    I thought the question was about printing?
    Always use [code][/code] tags when posting code.

  7. #7
    Join Date
    Jul 2010
    Location
    Watch Window
    Posts
    87

    Question Re: Printing A3 Size paper using printform Method .

    Hi,
    The following link might be helpful for you !!!.


    http://www.vbforums.com/showpost.php...21&postcount=1

  8. #8
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    457

    Question Re: Printing A3 Size paper using printform Method .

    Yes .When i tried to debug it says Expression is Too Complex.kindly find the attachment.
    Code:
    Private Sub UserControl_Initialize()
        On Error Resume Next
        m_WINNT = (Environ$("OS") = "Windows_NT")
    '    On Error Resume Next 'o
    '    m_ExtenderScale = UserControl.Extender.Container.ScaleMode
    '    If Err.Number Then
    '        Err.Clear
    '        m_ExtenderScale = UserControl.Parent.ScaleMode
    '        If Err.Number Then
    '            Err.Clear
    '            m_ExtenderScale = vbTwips
    '        End If
    '    End If
    '    On Error GoTo 0
    m_ExtenderScale = vbTwips
    End Sub
    Attached Images  
    Last edited by firoz.raj; October 14th, 2010 at 12:33 AM.

  9. #9
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,475

    Re: Printing A3 Size paper using printform Method .

    The attachment is useless. What is the code?
    Always use [code][/code] tags when posting code.

  10. #10
    Join Date
    Dec 2008
    Location
    Step Into(F11)
    Posts
    457

    Question Re: Printing A3 Size paper using printform Method .

    error is Generating at the following line !!!
    Code:
    Private Function GetFont(ByVal hDC As Long, Optional ByVal ForceBold As Boolean) As Long
        Dim udtMetrics As NONCLIENTMETRICS
        Dim SystemMenuFont As String, SystemMenuSize As Long
        Dim lngCaps As Long, sngPixelConv As Single, Divider As Single
        lngCaps = GetDeviceCaps(hDC, LOGPIXELSY)
        ' sometimes I can't figure out why IDE makes stupid error messages...
        ' yes, this is all because IDE raises an error on sngPixelConv = CSng(lngCaps / 80) !!!
        If Not InIDE Then
            If m_Font Is Nothing Then Divider = 80 Else Divider = 69.5
            sngPixelConv = CSng(lngCaps / Divider)
        Else
            On Error Resume Next
    TryAgain:
            If m_Font Is Nothing Then Divider = 80 Else Divider = 69.5
            sngPixelConv = CSng(lngCaps / Divider)
            If Err.Number <> 0 Then Err.Clear: GoTo TryAgain
            On Error GoTo 0
        End If
        If Not m_Font Is Nothing Then
            Dim udtLogFont  As LOGFONT, strFont As String * 32
            With udtLogFont
                strFont = m_Font.Name
                CopyMemory .lfFaceName(0), ByVal StrPtr(StrConv(strFont, vbFromUnicode)), Len(strFont)
                .lfCharSet = m_Font.Charset
                .lfHeight = m_Font.Size * -sngPixelConv
                .lfItalic = m_Font.Italic
                .lfStrikeOut = m_Font.Strikethrough
                .lfUnderline = m_Font.Underline
                If ForceBold Then
                    .lfWeight = m_Font.Weight * 2
                Else
                    .lfWeight = m_Font.Weight
                End If
            End With
            GetFont = CreateFontIndirect(udtLogFont)
            Exit Function
        End If
        udtMetrics.cbSize = Len(udtMetrics)
        SystemParametersInfo SPI_GETNONCLIENTMETRICS, udtMetrics.cbSize, udtMetrics, 0
        With udtMetrics.lfMenuFont
            If m_Font Is Nothing Then
                SystemMenuFont = StrConv(Left$(.lfFaceName, InStr(.lfFaceName, vbNullChar) - 1), vbUnicode)
                GetFont = CreateFont(-sngPixelConv * .lfHeight, .lfWidth, .lfEscapement, .lfOrientation, .lfWeight, .lfItalic, .lfUnderline, .lfStrikeOut, .lfCharSet, .lfOutPrecision, .lfClipPrecision, .lfQuality, .lfPitchAndFamily, StrPtr(SystemMenuFont))
            Else
                GetFont = CreateFont(-sngPixelConv * m_Font.Size, 0, .lfEscapement, .lfOrientation, m_Font.Weight, m_Font.Italic, m_Font.Underline, m_Font.Strikethrough, m_Font.Charset, .lfOutPrecision, .lfClipPrecision, .lfQuality, .lfPitchAndFamily, StrPtr(m_Font.Name))
            End If
        End With
    End Function

  11. #11
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,532

    Re: Printing A3 Size paper using printform Method .

    In this thread Mr Firoz has two problems:
    1) he wants to print in A3 size on a Printer which is able to print that size.
    2) He needs to print Arabic letters and the textboxes and the whole code needs to be able to support Unicode that way.

    I never worked with that so I'm sorry I cannot support him neither with the printer size, nor with arabic letters. Is there anyone who already did such things using arabic letters?
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  12. #12
    Join Date
    Jul 2010
    Location
    Watch Window
    Posts
    87

    Smile Re: Printing A3 Size paper using printform Method .

    This following link Might be Useful for Unicode!!!
    http://www.vbforums.com/showpost.php?p=3078121&postcount=1

  13. #13
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,532

    Re: Printing A3 Size paper using printform Method .

    Quote Originally Posted by xtab View Post
    This following link Might be Useful for Unicode!!!
    http://www.vbforums.com/showpost.php?p=3078121&postcount=1
    I think he is using that and gets a bunch of errors
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

+ Reply to Thread

Bookmarks

Posting Permissions

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



HTML5 Development Center

Click Here to Expand Forum to Full Width