Jump to content

Recommended Posts

Posted
Hello.. :)

I have two doubts.

1st) how to run google chrome and not I.E ??

2nd) where I find the example Layout Management -> Accordion Layout ??

 

Tanks.. :)

 

 

 

 

Posted

1st) how to run google chrome and not I.E ??

 

Hi,

 

if I understand correctly you, try:

uses ... UniGUIApplication;

procedure TMainForm.UniFormActivate(Sender: TObject);
var
  ClientInfo: TUniClientInfos;
begin
  ClientInfo := UniApplication.ClientInfo;
  
  if not (ciChrome in ClientInfo) then
    UniApplication.Terminate('sorry...');
end;

Best regards.

Posted
Excuse me if not expressed myself correctly.

 

when Unigui SERVER begins, it calls the I.E (default browser). I wish he called the CHROME.

 

Tanks.. :)
Posted

Put something like this in project source

FileName:= 'C:\Chrome\GoogleChromePortable\GoogleChromePortable.exe';
if extractFileExt(GetModuleName(Hinstance))='.exe' then
  ShellExecute(Application.Handle, PChar('Open'), PChar(FileName), PChar('Http://localhost:8077'), Nil,SW_Show);
  
Posted

 

Excuse me if not expressed myself correctly.
 
when Unigui SERVER begins, it calls the I.E (default browser). I wish he called the CHROME.
 
Tanks.. :)

Set Chrome to be default browser ;-)

Posted

Thank you all for your help

this code is perfect :)

 

begin
  Application.Initialize;
  TUniServerModule.Create(Application);

 

if extractFileExt(GetModuleName(Hinstance) ) ='.exe' then
     shellExecute(Application.Handle,
                  PChar('Open'),
                  'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe',
                  PChar('Http://127.0.0.1:8077'),
                  Nil,
                  SW_Show); //
  Application.Run;
end.
 
Thank you skafy :)
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...