Results 1 to 6 of 6

Thread: [RESOLVED] Open Chrome in Kiosk mode / full screen

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2019
    Posts
    35

    Resolved [RESOLVED] Open Chrome in Kiosk mode / full screen

    Hi All

    I'm writing a vb.net app that opens a HTML5 file stored on my local drive, i'm opening the file in chrome which works fine, but i cannot get it to open in kiosk mode or full screen mode. I've tried several different methods as per the code below but i just cannot get it to work.

    Code:
            Dim Process = New Process()
            Process.StartInfo.FileName = "chrome.exe"
            Process.StartInfo.FileName = "D:\story.html"
            Process.StartInfo.Arguments = "-kiosk"
            Process.Start()
    Ive also tried:

    Code:
    Process.Start("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "-kiosk", "D:\story.html")
    Please can someone point me in the right direction.

    Many thanks
    G

  2. #2
    Addicted Member Goggy's Avatar
    Join Date
    Oct 2017
    Posts
    196

    Re: Open Chrome in Kiosk mode / full screen

    Seems you need a double dash before your argument.
    This works by me...

    Code:
            Dim Task As New Process
            Task.StartInfo.FileName = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
            Task.StartInfo.Arguments = "--kiosk http://www.vbForums.com/"
            Task.Start()
    Utterly useless, but always willing to help

    As a finishing touch god created the dutch

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2019
    Posts
    35

    Re: Open Chrome in Kiosk mode / full screen

    Hi Goggy

    Thank you for your replay, that seems to work great when using a URL, when i try to load the html file it tells me that the file cannot be found. I've tried a few different variations but all yield the same result.

    Code:
    Task.StartInfo.Arguments = "--kiosk" & "D:\story.html"
    Code:
    Task.StartInfo.Arguments = "--kiosk D:\story.html
    Thanks again.

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2019
    Posts
    35

    Re: Open Chrome in Kiosk mode / full screen

    I managed to get it working correctly, i wasn't concatenating the string correctly. Here is working code:

    Code:
    Task.StartInfo.Arguments = "--kiosk """ & "D:\story.html" & ""
    I want to keep this thread open for now as the next task is to open Chrome in full screen mode on the second display.

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2019
    Posts
    35

    Re: Open Chrome in Kiosk mode / full screen

    Making progress here, the below code if anyone needs it. The section with "Display2" opens Chrome on the second screen

    Code:
            'Display 1
            Dim ChromeDisplay1 As New Process
            ChromeDisplay1.StartInfo.FileName = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
            ChromeDisplay1.StartInfo.Arguments = "--kiosk """ & "D:\story.html" & ""
            ChromeDisplay1.Start()
    
            'Display 2
            Dim ChromeDisplay2 As New Process
            ChromeDisplay2.StartInfo.FileName = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
            ChromeDisplay2.StartInfo.Arguments = "--kiosk """ & "D:\story2.html" & """ --window-position=1680,0" & ""
            ChromeDisplay2.Start()

  6. #6
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: Open Chrome in Kiosk mode / full screen

    Quote Originally Posted by GrantM View Post
    I managed to get it working correctly, i wasn't concatenating the string correctly. Here is working code:

    Code:
    Task.StartInfo.Arguments = "--kiosk """ & "D:\story.html" & ""
    I want to keep this thread open for now as the next task is to open Chrome in full screen mode on the second display.
    IMHO you're still not concatenating correctly... can someone tell me why, why, WHY people insist on concatenating two perfectly good constant strings together?

    Code:
    Task.StartInfo.Arguments = "--kiosk """ & "D:\story.html" & ""
    should be
    Code:
    Task.StartInfo.Arguments = "--kiosk ""D:\story.html"""
    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width