Click here to Skip to main content
16,021,430 members
Home / Discussions / C#
   

C#

 
GeneralRe: Code Download, amount downloaded Pin
John Fisher25-Jun-03 7:17
John Fisher25-Jun-03 7:17 
Generaldatateader problem Pin
Asim N.25-Jun-03 1:12
Asim N.25-Jun-03 1:12 
GeneralRe: datateader problem Pin
MadsJ25-Jun-03 1:49
MadsJ25-Jun-03 1:49 
GeneralName parser Pin
ecurren24-Jun-03 23:27
ecurren24-Jun-03 23:27 
GeneralRe: Name parser Pin
monrobot1325-Jun-03 3:00
monrobot1325-Jun-03 3:00 
GeneralRe: Name parser Pin
dynamic25-Jun-03 3:32
dynamic25-Jun-03 3:32 
GeneralRe: Name parser Pin
leppie25-Jun-03 14:16
leppie25-Jun-03 14:16 
GeneralMemoryStream and RichTextBox Pin
haezeban24-Jun-03 23:11
haezeban24-Jun-03 23:11 
Hi,
How can I use a memorystream in my richtextbox?
Now I do this, but it gives me a runtime error.

(In the real case I load a template of a letter in a string, do some replacements and then I want to show the results in a richtextbox. The string with the template I don't want to save it before I show it in the richtextbox. I want to save it only after I saw it in the richtextbox - there for the use of the memorystream)

string str = "abcdef";
this.TxT01 = new System.Windows.Forms.RichTextBox();

MemoryStream m = new MemoryStream();
for(int i=0;i< str.Length;i++)
{
m.WriteByte((byte)str[i]);
}
this.TxT01.LoadFile(m,RichTextBoxStreamType.RichText);
What I do wrong??
Thanks in advance for the help.


GeneralCursor coordinates in TextBox Pin
brian419024-Jun-03 22:08
brian419024-Jun-03 22:08 
GeneralRe: Cursor coordinates in TextBox Pin
brian419025-Jun-03 5:04
brian419025-Jun-03 5:04 
GeneralRe: Cursor coordinates in TextBox Pin
brian419025-Jun-03 5:29
brian419025-Jun-03 5:29 
GeneralEdit html document with mshtml Pin
benzite24-Jun-03 17:11
benzite24-Jun-03 17:11 
GeneralRe: Edit html document with mshtml Pin
J. Dunlap24-Jun-03 17:20
J. Dunlap24-Jun-03 17:20 
GeneralRe: Edit html document with mshtml Pin
benzite24-Jun-03 19:51
benzite24-Jun-03 19:51 
QuestionHow can I create a component in run-time and show it like as design mode? Pin
silver_ben24-Jun-03 16:06
silver_ben24-Jun-03 16:06 
AnswerRe: How can I create a component in run-time and show it like as design mode? Pin
John Fisher25-Jun-03 7:37
John Fisher25-Jun-03 7:37 
GeneralRe: How can I create a component in run-time and show it like as design mode? Pin
silver_ben30-Jun-03 19:38
silver_ben30-Jun-03 19:38 
GeneralInsanely simple interop question. Pin
Bog24-Jun-03 14:06
Bog24-Jun-03 14:06 
GeneralRe: Insanely simple interop question. Pin
Ranjan Banerji25-Jun-03 3:22
Ranjan Banerji25-Jun-03 3:22 
GeneralRe: Insanely simple interop question. Pin
Bog25-Jun-03 9:23
Bog25-Jun-03 9:23 
GeneralOverride OnPaint in TextBox control Pin
paulb24-Jun-03 13:31
paulb24-Jun-03 13:31 
GeneralRe: Override OnPaint in TextBox control Pin
jspano26-Jun-03 14:51
jspano26-Jun-03 14:51 
GeneralArrow keys in user controls Pin
duncanmeech24-Jun-03 12:35
duncanmeech24-Jun-03 12:35 
GeneralTesting for control+enter in a textbox Pin
monrobot1324-Jun-03 12:00
monrobot1324-Jun-03 12:00 
GeneralRe: Testing for control+enter in a textbox Pin
leppie24-Jun-03 12:42
leppie24-Jun-03 12:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.