Re: RichTextBox WYSIWYG

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Gerrit (msng1_at_newsgroups.nospam)
Date: 09/02/04

  • Next message: Jeffrey Tan[MSFT]: "RE: draw controls on ComboBox_DrawItem"
    Date: Thu, 2 Sep 2004 10:11:27 +0200
    
    

    Thanks Jeffrey. I'll give it a try.

    Regards,

    Gerrit

    ""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message
    news:isFNVELkEHA.2516@cpmsftngxa10.phx.gbl...
    > Hi Gerrit,
    >
    > Sorry for letting you wait for so long time.
    >
    > Based on my understanding, what you want is the printing result to be
    > consistent with the RichTextBox content displayed on the monitor. That is
    > when the RichTextBox changes width, the number of rows will change, and
    > you
    > want the print result also change with this.
    >
    > After doing some research, I found that we should calculate the characters
    > in each line and transform into respected space on the printer, and do the
    > text wrap(line-break) ourselves. But in .Net, there is no build-in support
    > for controlling the printer directly. We need P/invoke some Win32 spooler
    > functions to talk with the printer.
    >
    > The below article talks how to calculate the margins and do the text wrap
    > in VB6.0, it uses VB6.0's Printer object:
    > "HOWTO: Use GetDeviceCaps to Determine Margins on a Page"
    > http://support.microsoft.com/?id=193943
    >
    > The KB below tells us how to talk to printer directly in Visual C#:
    > "HOW TO: Send Raw Data to a Printer by Using Visual C# .NET"
    > http://support.microsoft.com/default.aspx?scid=322091
    >
    > Hope this helps
    >
    > Thank you for your patience and cooperation. If you have any questions or
    > concerns, please feel free to post it in the group. I am standing by to be
    > of assistance.
    >
    > Best regards,
    > Jeffrey Tan
    > Microsoft Online Partner Support
    > Get Secure! - www.microsoft.com/security
    > This posting is provided "as is" with no warranties and confers no rights.
    >


  • Next message: Jeffrey Tan[MSFT]: "RE: draw controls on ComboBox_DrawItem"

    Relevant Pages