Search code examples
vb.netvlc

VLC ProcessStartInfo Parameters to keep VLC always On top


I need to open VLC via a button click in VB.net program. I further require to set the VLC always on top setting to yes. The code to start VLC works as below:

 Dim startInfo As New ProcessStartInfo
                startInfo.FileName = ProgPath
                startInfo.Arguments = FilePath
                Process.Start(startInfo)

Is there a way to add further parametrs to set the always on top setting in VLC? I looked for the setting in their command line help file and found this but have no idea how to implement it.

--video-on-top, --no-video-on-top
                             Always on top (default disabled)
      Always place the video window on top of other windows. (default
      disabled)

is it possible to include that in my code to play the file and keep the VLC window on top?


Solution

  • Yes, just concatenate it together with the FilePath variable. Remember to put quotes around file paths as they may contain spaces.

    startInfo.Arguments = """" & FilePath & """ --video-on-top --no-video-on-top"