Jump to content

How RUN GoogleChrome an not the I.E


ric_rio

Recommended Posts

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.

Link to comment
Share on other sites

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);
  
Link to comment
Share on other sites

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 :)
 
Link to comment
Share on other sites

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...