Click here to Skip to main content
15,895,667 members
Home / Discussions / C#
   

C#

 
QuestionImplement Undo functionality Pin
Khaleek Ahmad26-Sep-08 1:42
Khaleek Ahmad26-Sep-08 1:42 
AnswerRe: Implement Undo functionality Pin
User 665826-Sep-08 2:13
User 665826-Sep-08 2:13 
QuestionHow to load PDF file Content in Rich Text Box using C# Pin
wasimsharp26-Sep-08 1:30
wasimsharp26-Sep-08 1:30 
AnswerRe: How to load PDF file Content in Rich Text Box using C# Pin
Ashfield26-Sep-08 3:27
Ashfield26-Sep-08 3:27 
AnswerRe: How to load PDF file Content in Rich Text Box using C# Pin
John Ad26-Sep-08 6:01
John Ad26-Sep-08 6:01 
Questioni want to save a image form serialization.... Pin
maifs26-Sep-08 1:03
maifs26-Sep-08 1:03 
AnswerRe: i want to save a image form serialization.... Pin
Anthony Mushrow26-Sep-08 1:18
professionalAnthony Mushrow26-Sep-08 1:18 
GeneralRe: i want to save a image form serialization.... Pin
maifs26-Sep-08 1:46
maifs26-Sep-08 1:46 
[Serializable]

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void Form1_Paint(object sender, PaintEventArgs e)

{

draw();

}

public void draw()

{

Graphics g = this.CreateGraphics();

Pen p = new Pen(Color.Red);

g.DrawRectangle(p, 23, 23, 78, 78);

}




using System.IO;


using System.Xml.Serialization;


public partial class Form2 : Form


{

public Form2()

{

InitializeComponent();

}


private static void Serialize()

{

Form1 obj = new Form1();



XmlSerializer mySerializer = new


XmlSerializer(typeof(Form1));


StreamWriter myWriter = new StreamWriter("C:\\myDrawing.xml");

mySerializer.Serialize(myWriter, obj);

myWriter.Close();

}

private static void DeSerialize()

{

Form1 obj = null;

XmlSerializer mySerializer =

new XmlSerializer(typeof(Form1));


FileStream myFileStream =

new FileStream("C:\\myDrawing.xml", FileMode.Open);


obj= (Form1)mySerializer.Deserialize(myFileStream);
obj.Draw();




}

private void Form2_Load(object sender, EventArgs e)

{

Serialize();


// Form1 f = new Form1();


// putIt objDele = new putIt(f.toi);



//objDele();



}

private void button1_Click(object sender, EventArgs e)

{


DeSerialize();


}

}

now i think its enough for understanding
?

hghghgh

GeneralRe: i want to save a image form serialization.... Pin
c242326-Sep-08 2:03
c242326-Sep-08 2:03 
GeneralRe: i want to save a image form serialization.... Pin
maifs26-Sep-08 2:40
maifs26-Sep-08 2:40 
GeneralRe: i want to save a image form serialization.... Pin
c242326-Sep-08 2:48
c242326-Sep-08 2:48 
GeneralRe: i want to save a image form serialization.... Pin
DaveyM6926-Sep-08 2:54
professionalDaveyM6926-Sep-08 2:54 
GeneralRe: i want to save a image form serialization.... Pin
Mark Salsbery26-Sep-08 6:54
Mark Salsbery26-Sep-08 6:54 
GeneralRe: i want to save a image form serialization.... Pin
maifs26-Sep-08 21:12
maifs26-Sep-08 21:12 
Questionhow to load Pdf file to file test to RichText Box Pin
wasimsharp26-Sep-08 1:02
wasimsharp26-Sep-08 1:02 
AnswerRe: how to load Pdf file to file test to RichText Box Pin
Simon P Stevens26-Sep-08 4:44
Simon P Stevens26-Sep-08 4:44 
AnswerRe: how to load Pdf file to file test to RichText Box Pin
John Ad26-Sep-08 7:40
John Ad26-Sep-08 7:40 
Questiontextbox control managing behaviour of editing content Pin
Witoldek26-Sep-08 0:59
Witoldek26-Sep-08 0:59 
AnswerRe: textbox control managing behaviour of editing content Pin
Anthony Mushrow26-Sep-08 1:22
professionalAnthony Mushrow26-Sep-08 1:22 
QuestionC# reflection? Pin
ppayal26-Sep-08 0:57
ppayal26-Sep-08 0:57 
AnswerRe: C# reflection? Pin
Simon P Stevens26-Sep-08 4:07
Simon P Stevens26-Sep-08 4:07 
QuestionFileStream Pin
kk.tvm25-Sep-08 22:24
kk.tvm25-Sep-08 22:24 
AnswerRe: FileStream Pin
Programm3r25-Sep-08 22:34
Programm3r25-Sep-08 22:34 
GeneralRe: FileStream Pin
kk.tvm26-Sep-08 0:21
kk.tvm26-Sep-08 0:21 
Questionget current instance of visual studio IDE Pin
Vinod C S25-Sep-08 22:22
Vinod C S25-Sep-08 22:22 

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.