Jump to content

Is it possible to hide the browser address bar


Timothy lam

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;
 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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();
    }
}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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😳

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 year later...
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);'
                );
 

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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