Jump to content

Responsive (Part I), on a demo example "Clientside Alignment - Layout Border"


Sherzod

Recommended Posts

  • 1 year later...
On 3/29/2023 at 8:39 AM, Phxtecno said:

I have seen that when you compile and run the application in delphi, the browser start automatically with your app...

while I usually go in the browser and have to refresh the page with localhost address.

Use ShellExecute on program principal.

I will send you more details tomorrow...

  • Like 1
Link to comment
Share on other sites

On 3/29/2023 at 8:39 AM, Phxtecno said:

I have seen that when you compile and run the application in delphi, the browser start automatically with your app...

while I usually go in the browser and have to refresh the page with localhost address.

 

I found this on forum :

program Project1;

uses
  windows,
  ShellAPI,
  SysUtils,
  Forms,

  ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule},
  MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule},
  Mainm in 'Mainm.pas' {MainmForm: TUnimForm};

{$R *.res}




BEGIN
//*************************************
  ReportMemoryLeaksOnShutdown := True;
//*************************************

  Application.Initialize;
  TUniServerModule.Create(Application);

 // Fast run
  if (IsDebuggerPresent)  // in Desktop mode only  (Not IIS, not as Service, not HyperServer)
  and (extractFileExt(GetModuleName(Hinstance))='.exe')
  then
  begin
   shellExecute(Application.Handle,
   // Desktop             
     PChar('Open'),
      PChar('Http://127.0.0.1:' + intToStr(ServerModule.UniServerModule.Port)),Nil,Nil,SW_Show);

   // Mobile
   //  PChar('Http://127.0.0.1:' + intToStr(ServerModule.UniServerModule.Port)+'/m'),Nil,Nil,SW_Show);
  end;
  Application.Run;
End.

 

  • Like 2
Link to comment
Share on other sites

  • 9 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...