Jump to content

How to get the browser name and it's version?


David

Recommended Posts

var ClientInfo : TUniClientInfoRec;

      BrowserType: string;

      BrowserVersion: string;

begin

     ClientInfo:=UniApplication.ClientInfoRec;
     BrowserType:=ClientInfo.BrowserType;
    BrowserVersion:= ClientInfo.BrowserVersion;

end;

Link to comment
Share on other sites

  • 1 year later...
[sOLVED]


I had put the code in the Main Module.

I wrote the code in the MainForm and is now ok.

Thank you.

-----------------------------------------------------------------------------


 

Hello everyone.

I follow the example above, but I can not build the my project.

I opened the ClientInfo Demo and perfect works.

I did the entire procedure in my project, but not working.

I forgot to declare somewhere some unit?

 

XE5, uniGUI Version:0.95.0 build 1046

 

Code:


procedure TMainForm.UniFormActivate(Sender: TObject);

var C : TUniClientInfoRec;

begin

  UniLabel7.Caption:=UniApplication.RemoteAddress;

  C:=UniApplication.ClientInfoRec; <----- PROBLEM: undeclared idenifier.

  UniLabel6.Caption:=C.BrowserType;

  UniLabel4.Caption:=IntToStr(C.BrowserVersion);

  UniLabel5.Caption:=C.OSType;

end;


 

Thanks.

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