473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Outputting bold text using PrintLine

I have a VB6 program upgraded to vb.net and I need to use the printline
function to write to a text file but I need certain characters in bold.
Would anyone be able to tell me how to do this, if possible? Thanks, Ellie
Jun 27 '08 #1
3 3032
I probably should have added that this file will then later be read into a
RichTextBox control and that is the only way it will be viewed.

"Ellie" <no****@nospam.netwrote in message
news:uN**************@TK2MSFTNGP02.phx.gbl...
>I have a VB6 program upgraded to vb.net and I need to use the printline
function to write to a text file but I need certain characters in bold.
Would anyone be able to tell me how to do this, if possible? Thanks, Ellie

Jun 27 '08 #2
On 2008-04-18, Ellie <no****@nospam.netwrote:
I probably should have added that this file will then later be read into a
RichTextBox control and that is the only way it will be viewed.

"Ellie" <no****@nospam.netwrote in message
news:uN**************@TK2MSFTNGP02.phx.gbl...
>>I have a VB6 program upgraded to vb.net and I need to use the printline
function to write to a text file but I need certain characters in bold.
Would anyone be able to tell me how to do this, if possible? Thanks, Ellie
Then you need to write out the text in rtf. At the minimum that might
look like:

{\rtf
This is text with some \b bold\b0 .
}

You can find the complete rtf specs online - but that may not be
necessary if what your doing is simple. One way to figure out what you
need is to just use Wordpad to create a simple rtf document with the
feature you want, and then open the generated document in notepad. That
way you can see the rtf markup.

--
Tom Shelton
Jun 27 '08 #3
Thanks. I was able to write out a rtb file and then read it into the
richtextbox.
"Tom Shelton" <to*********@YOUKNOWTHEDRILLcomcast.netwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
On 2008-04-18, Ellie <no****@nospam.netwrote:
>I probably should have added that this file will then later be read into
a
RichTextBox control and that is the only way it will be viewed.

"Ellie" <no****@nospam.netwrote in message
news:uN**************@TK2MSFTNGP02.phx.gbl...
>>>I have a VB6 program upgraded to vb.net and I need to use the printline
function to write to a text file but I need certain characters in bold.
Would anyone be able to tell me how to do this, if possible? Thanks,
Ellie

Then you need to write out the text in rtf. At the minimum that might
look like:

{\rtf
This is text with some \b bold\b0 .
}

You can find the complete rtf specs online - but that may not be
necessary if what your doing is simple. One way to figure out what you
need is to just use Wordpad to create a simple rtf document with the
feature you want, and then open the generated document in notepad. That
way you can see the rtf markup.

--
Tom Shelton

Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Imaya Kumar | last post by:
Hi, i'm developing an editor in VS.NET using Rich Text Box Control. I need to make a selected text Bold. how can i do this? also i will have an Italic Button too. If i click Bold button the...
2
by: sincethe2004 | last post by:
Hi, I'm write an asp to include part of a text file into my asp output html, I use FileSystemObject to get the content of the text file, but the asp just hang when it runs, the source code is...
3
by: Stijn | last post by:
Hello I'm new to vb.net. Can someone help me with this one? I'm trying to add text to an existing file. The function has to add text at the end of an existing text-file. The code I've got so far...
2
by: Xero | last post by:
I use this block of code to output a number to a plain text file: Dim counter As Double counter = 1 FileOpen(1, "output.txt", OpenMode.Output) PrintLine(1, counter) FileClose(1) Then I...
5
by: Stefan Mueller | last post by:
In HTML I use <b>...</b> to make parts of a text bold. <h1 class = "Style-MyText">This text is normal. <b>This text is bold.</b></h1> Now I'd like to do the same with a JavaScript. I tried...
9
by: Jason | last post by:
If I've got Me.RichTextBox1.Text = "In Ricn Tex Box" Me.RichTextBox1.Text &= "Line two" & vbCrLf How do I make the first line appear BOLD?
1
by: Pascal | last post by:
hello i would like to populate a listbox with words from a list (using openfiledialog) this list is made with one word per line like this : manger finir mourir courir etc...
12
by: billelev | last post by:
This is probably a very easy question to answer: I have been outputting some text to a message box, similar to the following: strOutput = "---" & Chr(10) & Chr(10) strOutput = strOutput &...
0
by: Guilherme Polo | last post by:
On Thu, Sep 18, 2008 at 1:06 PM, April Lekin <lekin2@llnl.govwrote: Yes. You could separate them in two labels (if you are using labels), or apply a different tag if you are using a Text...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.