Skip to content

Commit

Permalink
#49 It should also not force the windows in front when started from e…
Browse files Browse the repository at this point in the history
…xplorer
  • Loading branch information
JockeJarre committed Nov 4, 2023
1 parent ad93685 commit ba31a08
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions b2sbackglassserverexe/b2sbackglassserverexe/Classes/B2SScreen.vb
Original file line number Diff line number Diff line change
Expand Up @@ -420,18 +420,19 @@ Public Class B2SScreen
Me.formbackground.BackgroundImage = Image.FromFile(Me.BackgroundPath) ' ("C:\backglass.png")
End If
Me.formbackground.Show()
If B2SSettings.FormToBack Then
Me.formbackground.SendToBack()
Me.formbackground.ShowInTaskbar = False
ElseIf B2SSettings.FormToFront Then
Me.formbackground.BringToFront()
Me.formbackground.TopMost = True
If B2SSettings.FormNoFocus Then Me.formbackground.ShowInTaskbar = False
Else
Me.formbackground.BringToFront()
If Not B2SSettings.PureEXE Then
If B2SSettings.FormToBack Then
Me.formbackground.SendToBack()
Me.formbackground.ShowInTaskbar = False
ElseIf B2SSettings.FormToFront Then
Me.formbackground.BringToFront()
Me.formbackground.TopMost = True
If B2SSettings.FormNoFocus Then Me.formbackground.ShowInTaskbar = False
Else
Me.formbackground.BringToFront()
End If
End If
End If

' set forms to background image size
If formBackglass IsNot Nothing AndAlso formBackglass.BackgroundImage IsNot Nothing Then
formBackglass.Size = formBackglass.BackgroundImage.Size
Expand Down Expand Up @@ -483,17 +484,19 @@ Public Class B2SScreen
formBackglass.Location = Me.BackglassScreen.Bounds.Location + Me.BackglassLocation
formBackglass.Size = Me.BackglassSize

If B2SSettings.FormToFront Then
' bring backglass screen to the front and force it to stay
formBackglass.TopMost = True
formBackglass.BringToFront()
If B2SSettings.FormNoFocus Then formBackglass.ShowInTaskbar = False
ElseIf B2SSettings.FormToBack Then
' bring backglass screen to the back and force it to stay
formBackglass.SendToBack()
formBackglass.ShowInTaskbar = False
Else
formBackglass.BringToFront()
If Not B2SSettings.PureEXE Then
If B2SSettings.FormToFront Then
' bring backglass screen to the front and force it to stay
formBackglass.TopMost = True
formBackglass.BringToFront()
If B2SSettings.FormNoFocus Then formBackglass.ShowInTaskbar = False
ElseIf B2SSettings.FormToBack Then
' bring backglass screen to the back and force it to stay
formBackglass.SendToBack()
formBackglass.ShowInTaskbar = False
Else
formBackglass.BringToFront()
End If
End If

If StartBackground Then
Expand Down

0 comments on commit ba31a08

Please sign in to comment.