how to print rich textBox Formatted text
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: how to print rich textBox Formatted text

  1. #1
    Join Date
    Sep 2010
    Posts
    2

    Question how to print rich textBox Formatted text

    Hi,
    I have some text in rich text box format in a table.The data is like

    {\rtf1\ansi\ansicpg1252\deff0\deflang16393{\fonttbl{\f0\fnil\fcharset0 NSimSun;}{\f1\fnil\fcharset0 Microsoft Tai Le;}{\f2\fnil\fcharset0 MingLiU_HKSCS;}{\f3\fnil\fcharset0 Palace Script MT;}{\f4\fnil\fcharset0 Microsoft Sans Serif;}} {\colortbl ;\red0\green192\blue0;} \viewkind4\uc1\pard\cf1\b\f0\fs44 hello hi\par \lang1033\f1 hi i am fine\par \f2 about u?\lang16393\b0\i\f3\par \par \par \cf0\i0\f4\fs17\par }

    Now,I want to print the data in corresponding format.can u please Help me.....

  2. #2
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: how to print rich textBox Formatted text

    I don't believe this is straightforward. this link may help you, in fact it may be more than you need.

    http://www.codeproject.com/KB/printi...xDocument.aspx
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  3. #3
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,984

    Re: how to print rich textBox Formatted text

    Or, just save it as .RTB, and SHELL() the Print Command.

    Windows can print it directly. (it may flash Wordpad for a second, though)

    If you shell WP, you can hide it, and print using it.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 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!

  4. #4
    Join Date
    Sep 2010
    Posts
    2

    Re: how to print rich textBox Formatted text

    i know this ........
    but,my problem is that i want to print this data at the end of page( like a NOTE in specified location.i

  5. #5
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: how to print rich textBox Formatted text

    I don't think this is easy. Elements in the main body of the RTF refer to identifiers, usually at the top of the RTF.

    When you say you want to print it at the end of a page... In what format is the rest of the data on the page?

    Please give all of the information, then it will be easier to provide an answer.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center