How to restart the program after a function?
-
my project have some function,but after one function,i must close the program and debug it again then can run the other function.my teacher ask me to add a button, then user finished one function,click this button,the program like refresh then can use the other one. my question is how to restart the program?hope u can understand what i mean. thank you.
-
my project have some function,but after one function,i must close the program and debug it again then can run the other function.my teacher ask me to add a button, then user finished one function,click this button,the program like refresh then can use the other one. my question is how to restart the program?hope u can understand what i mean. thank you.
Hello, I would assume that you have to build a second update project wich is started (Process.Start) by your main programm (button click). After you started the update programm you can Exit the main programm. Your update program does whatever it should do and restarts the main program again. Be aware that you have to set the "WorkingDirectory" of your Updateprogramm process explicite, because default would be the mainprogram directory, and then you have problems if you have to delet, move, ... files from the main program. All the best, Martin
-
Hello, I would assume that you have to build a second update project wich is started (Process.Start) by your main programm (button click). After you started the update programm you can Exit the main programm. Your update program does whatever it should do and restarts the main program again. Be aware that you have to set the "WorkingDirectory" of your Updateprogramm process explicite, because default would be the mainprogram directory, and then you have problems if you have to delet, move, ... files from the main program. All the best, Martin
Martin ,thanks a lot for u r reply...but i still a little confused about this function...sorry
-
Martin ,thanks a lot for u r reply...but i still a little confused about this function...sorry
-
my project have some function,but after one function,i must close the program and debug it again then can run the other function.my teacher ask me to add a button, then user finished one function,click this button,the program like refresh then can use the other one. my question is how to restart the program?hope u can understand what i mean. thank you.