Click here to Skip to main content
15,913,773 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGrid selection Pin
Jay Shankar25-Aug-04 1:07
Jay Shankar25-Aug-04 1:07 
GeneralRe: DataGrid selection Pin
J.a.c.k26-Aug-04 5:48
J.a.c.k26-Aug-04 5:48 
GeneralRe: DataGrid selection Pin
Jay Shankar26-Aug-04 17:49
Jay Shankar26-Aug-04 17:49 
GeneralSaving Time from a DataGrid Pin
CarpyDog21-Aug-04 5:11
CarpyDog21-Aug-04 5:11 
GeneralRe: Saving Time from a DataGrid Pin
J.a.c.k21-Aug-04 22:15
J.a.c.k21-Aug-04 22:15 
GeneralRe: Saving Time from a DataGrid Pin
Anonymous22-Aug-04 0:26
Anonymous22-Aug-04 0:26 
GeneralRe: Saving Time from a DataGrid Pin
sreejith ss nair22-Aug-04 3:48
sreejith ss nair22-Aug-04 3:48 
GeneralRichTextBox - SaveFile problem Pin
QzRz21-Aug-04 1:20
QzRz21-Aug-04 1:20 
Hi...

I have made a RichTextBox and wants to save the text...!
but it keep throws an error..!
My code is like this...

RichTextBox TextTest = new RichTextBox();
TextTest.Multiline = true;
TextTest.Text = "Test on savint" + "\n";
TextTest.Text += "here is something" + "\n";
TextTest.Text += "And some more" + "\n";

Stream TextSave;
SaveFileDialog spil = new SaveFileDialog();
spil.Filter = "TXT fil|*.txt|Alle filer|*.*";
spil.Title = "Gem fil som tekstfil";
spil.InitialDirectory = Directory.GetCurrentDirectory();
if(spil.ShowDialog() == DialogResult.OK)
{
if((TextSave= spil.OpenFile()) != null)
{
TextTest.SaveFile(TextSave, RichTextBoxStreamType.PlainText);
TextSave.Close();
}
}

But it trows an errer -> System.NullReferenceException: Object no set to an instance of an object!

Can anyone help me what to do?


QzRz
GeneralRe: RichTextBox - SaveFile problem Pin
leppie21-Aug-04 4:48
leppie21-Aug-04 4:48 
GeneralRe: RichTextBox - SaveFile problem Pin
QzRz22-Aug-04 8:25
QzRz22-Aug-04 8:25 
GeneralRe: RichTextBox - SaveFile problem Pin
David Salter22-Aug-04 11:59
David Salter22-Aug-04 11:59 
GeneralRe: RichTextBox - SaveFile problem Pin
QzRz23-Aug-04 4:07
QzRz23-Aug-04 4:07 
GeneralRe: RichTextBox - SaveFile problem Pin
mav.northwind21-Aug-04 7:46
mav.northwind21-Aug-04 7:46 
Generalfilling untyped datasets Pin
Anonymous20-Aug-04 21:42
Anonymous20-Aug-04 21:42 
GeneralRe: filling untyped datasets Pin
Alex Korchemniy21-Aug-04 9:03
Alex Korchemniy21-Aug-04 9:03 
GeneralDate Translation Pin
oOomen20-Aug-04 21:27
oOomen20-Aug-04 21:27 
GeneralRe: Date Translation Pin
oOomen20-Aug-04 22:27
oOomen20-Aug-04 22:27 
QuestionC# IPHostEntry Cache??? Pin
gman4420-Aug-04 17:43
gman4420-Aug-04 17:43 
AnswerRe: C# IPHostEntry Cache??? Pin
leppie21-Aug-04 5:02
leppie21-Aug-04 5:02 
GeneralRe: C# IPHostEntry Cache??? Pin
gman4422-Aug-04 11:25
gman4422-Aug-04 11:25 
GeneralRe: C# IPHostEntry Cache??? Pin
leppie22-Aug-04 11:33
leppie22-Aug-04 11:33 
Questionwhich xml class to use to parse? Pin
vista2720-Aug-04 14:22
vista2720-Aug-04 14:22 
AnswerRe: which xml class to use to parse? Pin
Steven Campbell20-Aug-04 14:59
Steven Campbell20-Aug-04 14:59 
AnswerRe: which xml class to use to parse? Pin
Heath Stewart20-Aug-04 15:12
protectorHeath Stewart20-Aug-04 15:12 
QuestionExposing busines object assemblies to Visual Basic for Applications? Pin
Member 9620-Aug-04 14:21
Member 9620-Aug-04 14:21 

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.