|
Posted by AGO on January 22, 2008, 8:11 pm
Please log in for more thread options
I'm creating a document in VB.Net using this code.
dim txt as string
txt = "Hello World"
FileOpen(1, "c:\testdoc.rtf", OpenMode.Output)
Print(1, txt)
I need to format the text i.e. font size, bold. Can this method be used to
change the text format or is there another method I can use.
--
andy
|
|
Posted by Michael Salamone on January 23, 2008, 12:47 pm
Please log in for more thread options
Is this a Smartphone / Windows CE application? Methinks not if you are
using "C:\" in the filename as WinCE does not use drive names/letters.
Even if it is a Smartphone application, this isn't really a
Smartphone-related question.
In any case, file primitives know nothing about formatting or file contents
or anything other than how to read and write bytes. If you need to describe
fonts or other formatting, you need to include that formatting information
in the file contents, inline with the actual text. By the filename you
gave, it looks like you're using RichText, so the file writer needs to
understand the RichText specification so it can save files in accordance
with that specifcation. You might search for RichText specification or
APIs - or post to a more relevant newsgroup. Perhaps there's one focused on
RichText - don't know.
--
Michael Salamone, eMVP
Entrek Software, Inc.
www.entrek.com
> I'm creating a document in VB.Net using this code.
>
> dim txt as string
> txt = "Hello World"
> FileOpen(1, "c:\testdoc.rtf", OpenMode.Output)
> Print(1, txt)
>
> I need to format the text i.e. font size, bold. Can this method be used
> to
> change the text format or is there another method I can use.
>
>
> --
> andy
|
|
Posted by Lloyd W. McElan on January 25, 2008, 4:20 pm
Please log in for more thread options You may want to try this line of code right after the dim statement.
txt.Font = New System.Drawing.Font("Segoe", 8, System.Drawing.FontStyle.Bold)
--
Lloyd W. McElaney
"AGO" wrote:
> I'm creating a document in VB.Net using this code.
>
> dim txt as string
> txt = "Hello World"
> FileOpen(1, "c:\testdoc.rtf", OpenMode.Output)
> Print(1, txt)
>
> I need to format the text i.e. font size, bold. Can this method be used to
> change the text format or is there another method I can use.
>
>
> --
> andy
|
|
Posted by Lloyd W. McElan on January 25, 2008, 4:31 pm
Please log in for more thread options I forgot, before you try the new line of code you have to Dim txt As TextBox.
--
Lloyd W. McElaney
"AGO" wrote:
> I'm creating a document in VB.Net using this code.
>
> dim txt as string
> txt = "Hello World"
> FileOpen(1, "c:\testdoc.rtf", OpenMode.Output)
> Print(1, txt)
>
> I need to format the text i.e. font size, bold. Can this method be used to
> change the text format or is there another method I can use.
>
>
> --
> andy
|
| Similar Threads | Posted | | Writing privileged applications | June 27, 2005, 2:51 pm |
| eVC: Starting other app and writing a file | October 19, 2006, 3:33 am |
| writing programs for WM2005 in C++ | December 4, 2006, 8:40 am |
| Writing to the taskbar (not icons) | September 3, 2007, 4:38 pm |
| Hi Gary! A problem about writing filters | July 21, 2005, 8:34 pm |
| [Help] A problem of writing a parser filter! | August 8, 2005, 7:48 pm |
| writing control panel applet | December 9, 2005, 6:04 am |
| Problems writing SMS's to sim card on pocketpc using simmanager api.... | March 2, 2006, 10:14 am |
| drawing raw format (RGB/YUV) to Pocket PC | January 18, 2006, 10:43 am |
| The format of the DM notification message? | July 7, 2008, 10:47 pm |
|