c#.net
I have 2 forms. richtextbox1 is placed in form1.
listbox1 is used in form2. selectedindex of listbox1 is passing path to form1.
by using this path i am trying to load richtextbox1 using this code
richtextbox1.loadFile(filepath);
But i can't load richtextbox without closing form2.
I tried this meathod.
form2 ob2=new form2();
ob2.showdialog();
string filepath=ob2.label1.text;
richtextbox1.loadfile(filepath);
In selectedIndex of listbox1 in form2
//geting filepath
label.text=filepath;
this.close();
I want to load richtextbox without closing form2.
Is there is any meathod to load Richtextbox in this way?
Help me....