streamreader - Starting project in same solution with buttonClickEvent/Closing current c# -
what want achieve this: have solution 3 projects inside. i've added these projects explorer folder, solution explorer , made reference projecta projectb & projectc.
now want this, when click button on form of projecta (the first project user sees when opens exe) this:
private void projectbbutton_click(object sender, eventargs e) { this.hide(); projectb.form1 li = new projectb.form1 (); li.show(); }
that projectb form opens up.
this works problem other project hidden. possible add here projecta closed , projectb starts indepently. paths etc declared in projectb forms this:
inputstream = file.opentext("gevaar17.txt");
are still valid. (because filenotfoundexeption since it's looking in debug folder of projecta). , when search textfile in projectb form1 example doesn't go looking in projecta/bin/debug folder textfile. goes looking in debug folder of projectb?
thanks in advance.
private void projectbbutton_click(object sender, eventargs e) { process.start("project2.exe"); application.exit(); }
this start other project in independent environment , paths work. also, process.start()
returns process
can use if want, tip. add usings:
using system.diagnostics;
Comments
Post a Comment