0 Replies - 265 Views - Last Post: 21 June 2010 - 12:54 PM Rate Topic: -----

#1 smartflower2002  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 116
  • Joined: 20-May 10

forms query

Posted 21 June 2010 - 12:54 PM

TOPIC SOLVED, DID SOME RND AND ALL ISSUE"S GOT SOLVED

hey guys,
in my project i am trying to access a file, to access that file i used streamreader, and when it throws exception file not found, i m opening a new from (form2) in which content is "file not found, search file manually?"
and there are two buttons in form2, "YES" and "NO"

the no buttom will exit the application as it does, and so it does,

now when the user clicks on "yes"i want to load the opendialog box from form 1.. to atleast goto a label in form one. so is it possible, "jump from one form to another?"


and my second query about from.
how can i stop or pause form one till form two is closed.
ez
InitializeComponent();
            searchfile:
            try
            {

                using (StreamReader sr = new StreamReader(filename))
                {
                    file = sr.ReadToEnd();
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("File not found, search file manually?"");

                Form2 Form2 = new Form2();
                Form2.show();
//now i want to stop the code here, until Form2 Closes. and after form2 is closed, the code should be resumed


                goto searchfile;
            }


is it possible to do like that?

and my third query, incase i created a opendialogbox in form2 itself, and i got the name of file in form2, is it possible the string from form2 to form1?

please and thank you

This post has been edited by smartflower2002: 21 June 2010 - 01:21 PM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1