Search the Community
Showing results for tags 'restart'.
-
Hi, Everytime we recompile application, you must close in traybar and refresh browser page. The tip will automatically close application and start a new page in default browser. In Project, Options, Build Events,Pre-Build, write command: taskkill /F /IM program.exe /T procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin if self.StandAloneServer then //if you need this, if not, remove it. ExploreWeb('http://localhost:8077'); //auto start browser end; procedure ExploreWeb(page:PChar); var Returnvalue: integer; begin ReturnValue := ShellExecute(0, 'open', page, nil, nil,SW_SHOWNORMAL); if ReturnValue <= 32 then begin case Returnvalue of 0 : MessageBox(0,'Error: Out of memory','Error',0); ERROR_FILE_NOT_FOUND: MessageBox(0,'Error: File not found','Error',0); ERROR_PATH_NOT_FOUND: MessageBox(0,'Error: Directory not found','Error',0); ERROR_BAD_FORMAT : MessageBox(0,'Error: Wrong format in EXE','Error',0); else MessageBox(0,PChar('Error Nr: '+IntToStr(Returnvalue)+' inShellExecute'),'Error',0) end; end; end; procedure TFMainForm.UniFormShow(Sender: TObject); begin //show frame/form to login only if we are not debuging... if (DebugHook = 0) then begin FLogin.ShowModal; ... end; end;
- 13 replies
-
- 5
-
-
-
- kiill
- application
-
(and 3 more)
Tagged with: