|
-
Mar 10th, 2005, 12:55 AM
#1
Thread Starter
Addicted Member
-
Mar 10th, 2005, 12:58 AM
#2
Re: display static text in vb.net
-
Mar 10th, 2005, 01:05 AM
#3
Thread Starter
Addicted Member
Re: display static text in vb.net
Hi,
Thanks for immediate response.
I want only show the text..with richtextbox user can edit the text, right?
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Mar 10th, 2005, 01:08 AM
#4
Re: display static text in vb.net
Set the ReadOnly property to true for the RTB.
-
Mar 10th, 2005, 01:12 AM
#5
Thread Starter
Addicted Member
Re: display static text in vb.net
But then why can't i use Labels inseted of RTB...what is the difference between those two. if I make readonly-true, borderstyle-None and backcolor-control..then RTB looks like Label!!! Sorry..i hope i'm not irretating anybody by this silly questions...Just want to know about .net clearly.
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Mar 10th, 2005, 01:35 AM
#6
Hyperactive Member
Re: display static text in vb.net
make sure you set the rtb to multiline... Labels are only for a few words at the most. They are as their name suggest, to label things. You need an RTB or even a regular textbox would be ok.
-
Mar 10th, 2005, 03:52 AM
#7
Thread Starter
Addicted Member
Re: display static text in vb.net
Is RTB is the only way to show the text to the user. I have more than 2 pages of text in word document. I did the following coding to put the word document text in to RTB.
VB Code:
RichTextBox1.Text = "This is the first line" _
& vbCrLf _
& "This is the second line" _
& vbCrLf _
& "This is the third line" _
& vbCrLf _
& "This is the fourth line" _
& vbCrLf _
& "This is the fifth line"
Am i doing correctly?
Last edited by haihems; Mar 11th, 2005 at 09:50 PM.
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Mar 10th, 2005, 09:57 AM
#8
Re: display static text in vb.net
You could also just save the word document as a .rtf and then load the document a runtime
VB Code:
RichTextBox1.Load("C:\My Path\My File.rtf")
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Mar 11th, 2005, 11:26 PM
#9
Thread Starter
Addicted Member
Re: display static text in vb.net
 Originally Posted by <ABX
You could also just save the word document as a .rtf and then load the document a runtime
VB Code:
RichTextBox1.Load("C:\My Path\My File.rtf")
Thanks...it helps me to show the text...
but the syntax is...
VB Code:
RichTextBox1.LoadFile("C:\My Path\My File.rtf")
Big thanks to everybody
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
-
Mar 12th, 2005, 04:44 AM
#10
Re: display static text in vb.net
 Originally Posted by haihems
Thanks...it helps me to show the text...
but the syntax is...
VB Code:
RichTextBox1.LoadFile("C:\My Path\My File.rtf")
Big thanks to everybody 
Argh.. My memorys letting up on me
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|