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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...