Timothy lam Posted May 3, 2021 Share Posted May 3, 2021 Hi, Is it possible to hide the browser address bar? I found the oldest post that using the following shortcut. But it is not my expected solution because we will not create any shortcut for users. "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=http://yourSiteAddress:8077 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 3, 2021 Share Posted May 3, 2021 1 hour ago, Timothy lam said: Is it possible to hide the browser address bar? I found the oldest post that using the following shortcut. But it is not my expected solution because we will not create any shortcut for users. Hello, In general, there is no possibility. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 Hello, did You try to use FullScreen ? Is this ok for You? Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 Is it using mfPage? This solution is not matched with my expected result. I want to like press "F11" result or hide the URL address bar. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 19 minutes ago, Timothy lam said: Is it using mfPage? This solution is not matched with my expected result. I want to like press "F11" result or hide the URL address bar. No, I use this when click on login button: //if has settings if (StrToBool (UniServerModule.SistemSettingsList.Values ['WebFormInFullScreen']) = True) //only for desktop //AND (UniApplication.UniPlatform = [upDesktop]) then begin UniButtonLogIn.ClientEvents.ExtEvents.Values['click'] := 'function click(sender, eOpts){ launchIntoFullscreen(document.documentElement);}'; end; Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 15 minutes ago, irigsoft said: No, I use this when click on login button: //if has settings if (StrToBool (UniServerModule.SistemSettingsList.Values ['WebFormInFullScreen']) = True) //only for desktop //AND (UniApplication.UniPlatform = [upDesktop]) then begin UniButtonLogIn.ClientEvents.ExtEvents.Values['click'] := 'function click(sender, eOpts){ launchIntoFullscreen(document.documentElement);}'; end; I tried the above code and only put "UniButtonLogIn.ClientEvents.ExtEvents.Values['click'] := 'function click(sender, eOpts){ launchIntoFullscreen(document.documentElement);}';". That is without any effect. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 6 minutes ago, Timothy lam said: I tried the above code and only put "UniButtonLogIn.ClientEvents.ExtEvents.Values['click'] := 'function click(sender, eOpts){ launchIntoFullscreen(document.documentElement);}';". That is without any effect. Sorry, this must be added in procedure TYourForm.UniFormCreate(Sender: TObject); and this in TYourForm.Script: function launchIntoFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { element.webkitRequestFullscreen(); } else if (element.msRequestFullscreen) { element.msRequestFullscreen(); } } function exitFullscreen() { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } } Quote Link to comment Share on other sites More sharing options...
Tokay Posted May 3, 2021 Share Posted May 3, 2021 Maybe pwa mode could help you (you can to gogle it). Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 38 minutes ago, irigsoft said: Sorry, this must be added in procedure TYourForm.UniFormCreate(Sender: TObject); I added "launchIntoFullscreen(document.documentElement);" in UniLabel.ClientEvents.ExtEvents and your Script in Main.Script. It hasn't any effect. I guess I may make something wrong and missing something. Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 24 minutes ago, Tokay said: May be pwa mode could help you (you can to gogle it). Thanks Tokay's advise. I haven't got any information for UniGui. It has information for TMS and IntraWeb. I'm a starter that may be too difficult for me😳 Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 5 minutes ago, Timothy lam said: I added "launchIntoFullscreen(document.documentElement);" in UniLabel.ClientEvents.ExtEvents and your Script in Main.Script. It hasn't any effect. I guess I may make something wrong and missing something. Here is simple example : Project2.zip Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 Fullscreen mode can start only from click event (by security reasons). So in Your mobile device after login browser will go to full screen. Other possible solution is to use Android webview (Create Android app) Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 Hi Irigsoft, Great for help. Thanks a lot. But it can't using minimize feature under full screen. So I think I will give up this thinking. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 10 minutes ago, Timothy lam said: Hi Irigsoft, Great for help. Thanks a lot. But it can't using minimize feature under full screen. So I think I will give up this thinking. Why is Your need to hide address bar ? Minimize is not work even without full screen. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 I add some user code to minimize form: procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'minimize' then begin top := Screen.Height - 100; Left := 10; width := 100; height := 20; end; end; Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 4 minutes ago, irigsoft said: Why is Your need to hide address bar ? Minimize is not work even without full screen. User can easy click other browser features because the their experience. Then it will cause some unknown issues such as press refresh button. I already set UniGUI to warn the user if press refresh. Besides, I disable the right click, backward button that minimize the human mistake. User can minimize the browser in normal mode. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 3 minutes ago, Timothy lam said: User can easy click other browser features because the their experience. Then it will cause some unknown issues such as press refresh button. I already set UniGUI to warn the user if press refresh. Besides, I disable the right click, backward button that minimize the human mistake. User can minimize the browser in normal mode. On what platform will be used this application, mobile device ? Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 Just now, irigsoft said: On what platform will be used this application, mobile device ? Currently is using VCL application under 2-tier design that communicate with all systems. Now I want to migrate the application to 3-tier with multi-platforms. I want to doing C/S and B/S (Web & Mobile) because we have multi-branches in different countries. We can't using B/S for all applications because we have MES, ERP, EAM, FAM, WMS systems that may have performance issues. But B/S is a good solutions for management who can easy monitor the manufacturing status in anywhere. However, I haven't any experience for web platform design that so need always to ask for help.😅 Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 1 minute ago, Timothy lam said: Currently is using VCL application under 2-tier design that communicate with all systems. Now I want to migrate the application to 3-tier with multi-platforms. I want to doing C/S and B/S (Web & Mobile) because we have multi-branches in different countries. We can't using B/S for all applications because we have MES, ERP, EAM, FAM, WMS systems that may have performance issues. But B/S is a good solutions for management who can easy monitor the manufacturing status in anywhere. However, I haven't any experience for web platform design that so need always to ask for help.😅 I'm not sure how to make it all work without making different designs for different platforms, but here's my solution: 1. I have a VCL application - ERP 2. Another VCL application with different user designs - POS software 3. Now add a uniGui server with the capabilities of POS software, but for the web At the moment I only have one web server and it works like this: 1. The created designs are used by POS (this helps me to create dynamic elements and functionality) 2. I wrote an Android application using webview And the result is: I have a mobile platform and without coding it works on mobile devices and web browsers. If a User of VCL POS software goes to the WEb, I simply add the uniGui web application and give them the ability to work in a browser without losing their functionality. If the user wants to work in a mobile device, I make a design for a mobile device (to optimize the space in the mobile device). I have my own designer and I write the designs in XML files, and this allows me to encode one design + functionality once and it works equally on all platforms Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 2 minutes ago, irigsoft said: I haven't any experience for web platform design that so need always to ask for help The problem with that is only if You want to make things in Client-side else on Server -side only Delphi is enough Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 6 minutes ago, irigsoft said: I'm not sure how to make it all work without making different designs for different platforms, but here's my solution: 1. I have a VCL application - ERP 2. Another VCL application with different user designs - POS software 3. Now add a uniGui server with the capabilities of POS software, but for the web At the moment I only have one web server and it works like this: 1. The created designs are used by POS (this helps me to create dynamic elements and functionality) 2. I wrote an Android application using webview And the result is: I have a mobile platform and without coding it works on mobile devices and web browsers. If a User of VCL POS software goes to the WEb, I simply add the uniGui web application and give them the ability to work in a browser without losing their functionality. If the user wants to work in a mobile device, I make a design for a mobile device (to optimize the space in the mobile device). I have my own designer and I write the designs in XML files, and this allows me to encode one design + functionality once and it works equally on all platforms My solution is something like your solution. We want to achieve Industrial 4.0 & Enterprise 4.0. So I need to build the new platform that can collect the data between all systems. It can provide the consolidate information and let management to have fast decision making. Besides, this middleware platform need to assist all systems if those systems can't handle and communicate with other systems. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted May 3, 2021 Share Posted May 3, 2021 16 minutes ago, Timothy lam said: My solution is something like your solution. We want to achieve Industrial 4.0 & Enterprise 4.0. So I need to build the new platform that can collect the data between all systems. It can provide the consolidate information and let management to have fast decision making. Besides, this middleware platform need to assist all systems if those systems can't handle and communicate with other systems. So, why the problem with browsers buttons is so important ? Web is not VCL And many browsers make things worse by security reasons. I googling for disable browser's address bar and see that was possible before, but now is not. I make for my clients if they want to work like VCL then browser after login go to Full Screen and add in Mainform Button to exit of fullscreen. All forms are in Pagemode and all look like one ModalForm. Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 3, 2021 Author Share Posted May 3, 2021 Noted with thanks Quote Link to comment Share on other sites More sharing options...
irigsoft Posted September 26, 2022 Share Posted September 26, 2022 On 5/3/2021 at 2:31 PM, Timothy lam said: Noted with thanks Hello, I found this old topic and must correct my information. I added a javascript function to my button and it now makes the main form full screen on mobile. add this in myForm.Script: function launchIntoFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { element.webkitRequestFullscreen(); } else if (element.msRequestFullscreen) { element.msRequestFullscreen(); } } and call it in SomeButton.Click: uniSession.addJS ('function launchIntoFullscreen(element) {' + ' if (element.requestFullscreen) {' + ' element.requestFullscreen();' + ' } else if (element.mozRequestFullScreen) {' + ' element.mozRequestFullScreen();' + ' } else if (element.webkitRequestFullscreen) {' + ' element.webkitRequestFullscreen();' + ' } else if (element.msRequestFullscreen) {' + ' element.msRequestFullscreen();' + ' }' + '}' + ' launchIntoFullscreen(document.documentElement);' ); 1 Quote Link to comment Share on other sites More sharing options...
asapltda Posted November 2, 2022 Share Posted November 2, 2022 OK FUNCIONA EN MOVIL EXPLORADOR BRAVE , WELL WORKS IN BRAVE BROWSER Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.