Skip to content

Commit

Permalink
Fix config Windows 10
Browse files Browse the repository at this point in the history
Fix command line for configuration in windows 10
  • Loading branch information
Tom committed Jan 27, 2019
1 parent f5ae2b3 commit 62193b6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions RailtimeScreenSaver/Main.vb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ Module Main

ScreenSaverForms.Add(Saver) 'for /p (preview) only load 1 screen saver form!

For i As Integer = 0 To CmdLineArgs.Count - 1
For i As Integer = 1 To CmdLineArgs.Count - 1
If CmdLineArgs(i).ToLower() Like "/c:*" Then 'windows 10 gives a hwnd for configuration??
CmdLineArgs(i) = "/c"
End If
Select Case LCase(CmdLineArgs(i))
Case "/c"
RunningMode = ScreenSaverRunningModes.Configuration
Expand Down Expand Up @@ -109,12 +112,12 @@ Module Main
Case "-s"

Case "/?", "-?"
MsgBox("Supported command line options: " & vbCrLf & _
"/C Show configuration window." & vbCrLf & _
"/T Test mode." & vbCrLf & _
"/S Run screensaver in full screen." & vbCrLf & _
"/P <hwnd> Preview mode, hwnd is preview window handle." & vbCrLf & _
"/W Window mode." & vbCrLf & _
MsgBox("Supported command line options: " & vbCrLf &
"/C Show configuration window." & vbCrLf &
"/T Test mode." & vbCrLf &
"/S Run screensaver in full screen." & vbCrLf &
"/P <hwnd> Preview mode, hwnd is preview window handle." & vbCrLf &
"/W Window mode." & vbCrLf &
"-s <path> Use settings in <path> config file, default is railtime_settings.xml in program directory or if not exists settings is created in %appdata%/railtime_screensaver folder is used.")
End Select
Next
Expand Down

0 comments on commit 62193b6

Please sign in to comment.