Procedure to force "restart" of application...
-
- User
- Posts: 29
- Joined: Sat Oct 26, 2019 6:48 pm
Procedure to force "restart" of application...
Does anyone know of either a built-in PB procedure, or possibly even a custom procedure, to force a restart of an application? Say... for when the end-user changes an application option that will require a restart for that change to take effect.
Re: Procedure to force "restart" of application...
Code: Select all
RunProgram(ProgramFilename())
End
Hygge
-
- User
- Posts: 29
- Joined: Sat Oct 26, 2019 6:48 pm
Re: Procedure to force "restart" of application...
Just to be clear before I do anything which might prove how unskilled I truly am...
Is the 'RunProgram()' procedure for executing an external program, or for restarting the current program? Or, perhaps both?
Is the 'RunProgram()' procedure for executing an external program, or for restarting the current program? Or, perhaps both?
- VB6_to_PBx
- Enthusiast
- Posts: 617
- Joined: Mon May 09, 2011 9:36 am
Re: Procedure to force "restart" of application...
Dudemeister wrote:Just to be clear before I do anything which might prove how unskilled I truly am...
Is the 'RunProgram()' procedure for executing an external program, or for restarting the current program? Or, perhaps both?
Code: Select all
RunProgram(ProgramFilename()) : End ;<<--- will completely restart your program
in my program , i use this below to restart my program , but not from scratch
because i just want to clear all [ClearAll(0) procedure] choices and variables
and because i have EULA Agreement Window + License Window that pops up
when i 1st run my Program ... so to stop those 2 Windows from starting up if i just want to simply Restart with "New File" choice
i use this method instead :
Code: Select all
Case 5 ;-[ 5 ] New File - Restart Program to clear everything
ClearAll(0) : MainWindow() ;<<--- RunProgram(ProgramFilename()) : End ; another way to restart entire program
MainWindow() ... can be like calling your Window_0 or Window_1 main Procedure to start all over again without actually ending your Program
PureBasic .... making tiny electrons do what you want !
"With every mistake we must surely be learning" - George Harrison