diff --git a/b2sbackglassserver/b2sbackglassserver/Classes/B2SScreen.vb b/b2sbackglassserver/b2sbackglassserver/Classes/B2SScreen.vb index 54880b5..5986d6e 100644 --- a/b2sbackglassserver/b2sbackglassserver/Classes/B2SScreen.vb +++ b/b2sbackglassserver/b2sbackglassserver/Classes/B2SScreen.vb @@ -368,9 +368,9 @@ Public Class B2SScreen ((Me.DMDViewMode = eDMDViewMode.ShowDMD) OrElse (Me.DMDViewMode = eDMDViewMode.ShowDMDOnlyAtDefaultLocation AndAlso Me.DMDAtDefaultLocation) OrElse (Me.DMDViewMode = eDMDViewMode.DoNotShowDMDAtDefaultLocation AndAlso Not Me.DMDAtDefaultLocation))) -#If B2S = "DLL" Then + On Error Resume Next -#End If + ' get the correct screen Me.BackglassScreen = ScreensOrdered(0) Dim s As Screen @@ -423,7 +423,7 @@ Public Class B2SScreen Me.formbackground.Size = Me.BackgroundSize Me.formbackground.Text = "B2S Backglass Server" Me.formbackground.BackColor = Color.Black - If (IO.File.Exists(Me.BackgroundPath)) Then + If (File.Exists(Me.BackgroundPath)) Then Me.formbackground.BackgroundImage = Image.FromFile(Me.BackgroundPath) ' ("C:\backglass.png") End If Me.formbackground.Show() @@ -515,7 +515,7 @@ Public Class B2SScreen formBackglass.Text = "B2S Backglass Server" formBackglass.Show() End If -#If B2S = "DLL" Then +#If B2S = "DLLBefore" Then ' bring backglass screen to the front If B2SSettings.FormToFront Then formBackglass.TopMost = True formBackglass.BringToFront() @@ -529,7 +529,7 @@ Public Class B2SScreen Me.formDMD.ControlBox = False Me.formDMD.MaximizeBox = False Me.formDMD.MinimizeBox = False -#If B2S = "DLL" Then +#If B2S = "DLLBefore" Then Me.formDMD.Location = formBackglass.Location + Me.DMDLocation #Else Me.formDMD.Location = Me.BackglassScreen.Bounds.Location + DMDKeepBackglassLocation + Me.DMDLocation diff --git a/b2sbackglassserver/b2sbackglassserver/Classes/B2SSettings.vb b/b2sbackglassserver/b2sbackglassserver/Classes/B2SSettings.vb index 0e1b995..dfdd4d8 100644 --- a/b2sbackglassserver/b2sbackglassserver/Classes/B2SSettings.vb +++ b/b2sbackglassserver/b2sbackglassserver/Classes/B2SSettings.vb @@ -256,7 +256,7 @@ Public Class B2SSettings Public Shared Function GetSettingFilename() As String If IO.File.Exists(filename) Then Return filename -#If B2S = "DLL" Then +#If B2S = "DLLBefore" Then ElseIf StartAsEXE And B2STableSettingsExtendedPath And IO.File.Exists(IO.Path.Combine(Application.StartupPath(), filename)) Then Return IO.Path.Combine(Application.StartupPath(), filename) #Else diff --git a/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb b/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb index eeb5376..7de9353 100644 --- a/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb +++ b/b2sbackglassserver/b2sbackglassserver/Forms/formBackglass.vb @@ -58,7 +58,7 @@ Public Class formBackglass #Region "constructor and closing" -#If B2S = "DLL" Then + Public Sub New() InitializeComponent() @@ -70,16 +70,56 @@ Public Class formBackglass ' set key preview to allow some key action Me.KeyPreview = True - B2SScreen = New B2SScreen() +#If B2S = "EXE" Then + If My.Application.CommandLineArgs.Count > 0 Then + B2SData.TableFileName = My.Application.CommandLineArgs(0).ToString - ' load settings - B2SSettings.Load() + If B2SData.TableFileName.EndsWith(".directb2s") Then + B2SData.TableFileName = Path.GetFileNameWithoutExtension(B2SData.TableFileName) + B2SSettings.PureEXE = True + End If + + If My.Application.CommandLineArgs.Count > 1 Then + If My.Application.CommandLineArgs(1).ToString = "1" Then + Me.TopMost = True + End If + End If + Else + MessageBox.Show("Please do not start the EXE this way.", My.Resources.AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Error) + End + End If + + + ' get the game name + 'B2SSettings.GameName = "bguns_l8" + 'B2SSettings.GameName = "closeenc" + 'B2SSettings.B2SName = "Baseball" + 'B2SSettings.B2SName = "Spider-Man(Stern 2007) alt full dmdON127" + 'B2SSettings.GameName = "smanve_101" + 'B2SData.TableFileName = "Spider-Man(Stern 2007) alt full dmdON127" + + + Using regkey As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\B2S") + B2SSettings.GameName = regkey.GetValue("B2SGameName", String.Empty) + B2SSettings.B2SName = regkey.GetValue("B2SB2SName", String.Empty) + End Using + + ' Westworld 2016-18-11 - TableFileName is empty in some cases when launched via PinballX, we use GameName as alternativ + If String.IsNullOrEmpty(B2SData.TableFileName) Then + B2SData.TableFileName = B2SSettings.GameName + End If If B2SSettings.CPUAffinityMask > 0 Then Dim Proc = Process.GetCurrentProcess Proc.ProcessorAffinity = B2SSettings.CPUAffinityMask End If +#Else + Me.TopMost = True +#End If + B2SScreen = New B2SScreen() + ' load settings + B2SSettings.Load() ' get B2S xml and start Try LoadB2SData() @@ -87,7 +127,11 @@ Public Class formBackglass If B2SSettings.ShowStartupError Then MessageBox.Show(ex.Message, My.Resources.AppTitle, Windows.Forms.MessageBoxButtons.OK, Windows.Forms.MessageBoxIcon.Error) End If +#If B2S = "DLL" Then Stop +#Else + End +#End If End Try ' initialize screen settings InitB2SScreen() @@ -98,11 +142,29 @@ Public Class formBackglass ' show snippits ShowStartupSnippits() +#If B2S = "DLL" Then ' create 'image on' timer and start it startupTimer = New Timer() startupTimer.Interval = 2000 AddHandler startupTimer.Tick, AddressOf StartupTimer_Tick startupTimer.Start() +#Else + ' create 'image on' timer and start it + timer = New Timer() + timer.Interval = 2000 + AddHandler timer.Tick, AddressOf Timer_Tick + timer.Start() + + ' create 'table is still running' timer + tableTimer = New Timer + tableTimer.Interval = 207 + AddHandler tableTimer.Tick, AddressOf TableTimer_Tick + + ' create B2S data timer + B2STimer = New Timer + B2STimer.Interval = 13 + AddHandler B2STimer.Tick, AddressOf B2STimer_Tick +#End If ' create rotation timer rotateTimer = New Timer @@ -112,13 +174,12 @@ Public Class formBackglass AddHandler rotateTimer.Tick, AddressOf RotateTimer_Tick End Sub - +#If B2S = "DLL" Then Public Sub New(ByVal doNotLoadBackglassData As Boolean) InitializeComponent() ' set some styles - 'Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint, True) Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or ControlStyles.OptimizedDoubleBuffer, True) Me.DoubleBuffered = True @@ -172,136 +233,30 @@ Public Class formBackglass snifferTimer.Start() End Sub -#Else - Public Sub New() - - InitializeComponent() - - ' set some styles - Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or ControlStyles.OptimizedDoubleBuffer, True) - Me.DoubleBuffered = True - - ' set key peview to allow some key action - Me.KeyPreview = True - - ' mabye create the base registry key - If Registry.CurrentUser.OpenSubKey("Software\B2S") Is Nothing Then Registry.CurrentUser.CreateSubKey("Software\B2S") - If Registry.CurrentUser.OpenSubKey("Software\B2S\VPinMAME") Is Nothing Then Registry.CurrentUser.CreateSubKey("Software\B2S\VPinMAME") - - ' get the table - 'IO.Directory.SetCurrentDirectory("C:\Visual Pinball\Tables") - 'B2SData.TableFileName = "Big Guns (Williams 1987)_1.0" - 'B2SData.TableFileName = "ScaredStiff_FS_B2S_GI8" - 'B2SData.TableFileName = "ACDC_B2S" '"Baseball 1.0 FS" '"Elvira_and_the_Party_Monsters_VP91x_v1.2FS" '"Close_Encounters_FS" - 'B2SData.TableFileName = "Close_Encounters_FS" - 'B2SData.TableFileName = "Pinbot.uw.V1.02.1_JF_91x_BMPR_MOD_FS" - 'B2SData.TableFileName = "ScaredStiff_FS_B2S" - If My.Application.CommandLineArgs.Count > 0 Then - B2SData.TableFileName = My.Application.CommandLineArgs(0).ToString - - If B2SData.TableFileName.EndsWith(".directb2s") Then - B2SData.TableFileName = Path.GetFileNameWithoutExtension(B2SData.TableFileName) - B2SSettings.PureEXE = True - End If - - If My.Application.CommandLineArgs.Count > 1 Then - If My.Application.CommandLineArgs(1).ToString = "1" Then - Me.TopMost = True - End If - End If - Else - MessageBox.Show("Please do not start the EXE this way.", My.Resources.AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Error) - End - End If - - - ' get the game name - 'B2SSettings.GameName = "bguns_l8" - 'B2SSettings.GameName = "closeenc" - 'B2SSettings.B2SName = "Baseball" - 'B2SSettings.B2SName = "Spider-Man(Stern 2007) alt full dmdON127" - 'B2SSettings.GameName = "smanve_101" - 'B2SData.TableFileName = "Spider-Man(Stern 2007) alt full dmdON127" - - - Using regkey As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\B2S") - B2SSettings.GameName = regkey.GetValue("B2SGameName", String.Empty) - B2SSettings.B2SName = regkey.GetValue("B2SB2SName", String.Empty) - End Using - - ' Westworld 2016-18-11 - TableFileName is empty in some cases when launched via PinballX, we use GameName as alternativ - If String.IsNullOrEmpty(B2SData.TableFileName) Then - B2SData.TableFileName = B2SSettings.GameName - End If - B2SScreen = New B2SScreen() ' was started before Tablename was identified, so alternativ ScreenRes was failing - - - ' load settings - B2SSettings.Load() - - If B2SSettings.CPUAffinityMask > 0 Then - Dim Proc = Process.GetCurrentProcess - Proc.ProcessorAffinity = B2SSettings.CPUAffinityMask - End If - - ' get B2S xml and start - Try - LoadB2SData() - Catch ex As Exception - If B2SSettings.ShowStartupError Then - MessageBox.Show(ex.Message, My.Resources.AppTitle, Windows.Forms.MessageBoxButtons.OK, Windows.Forms.MessageBoxIcon.Error) - End If - End - End Try - - ' initialize screen settings - InitB2SScreen() - - ' resize images - ResizeSomeImages() - - ' show snippits - ShowStartupSnippits() - - ' create 'image on' timer and start it - timer = New Timer() - timer.Interval = 2000 - AddHandler timer.Tick, AddressOf Timer_Tick - timer.Start() - - ' create 'table is still running' timer - tableTimer = New Timer - tableTimer.Interval = 207 - AddHandler tableTimer.Tick, AddressOf TableTimer_Tick - - ' create B2S data timer - B2STimer = New Timer - B2STimer.Interval = 13 - AddHandler B2STimer.Tick, AddressOf B2STimer_Tick - - ' create rotation timer - rotateTimer = New Timer - If rotateTimerInterval > 0 Then - rotateTimer.Interval = rotateTimerInterval - End If - AddHandler rotateTimer.Tick, AddressOf RotateTimer_Tick - - End Sub +#End If Private Sub formBackglass_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown +#If B2S = "EXE" Then If Not B2SSettings.FormToFront Then Me.SendToBack() End If - - - 'Me.TopMost = False - SetFocusToVPPlayer() +#Else + If Not B2SSettings.FormToFront Then + Me.SendToBack() + Else + Dim StoreTopMost As Boolean = Me.TopMost - End Sub + Me.TopMost = True + Me.BringToFront() + SetFocusToVPPlayer() + Me.TopMost = StoreTopMost + End If #End If + End Sub + Private Sub formBackglass_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing On Error Resume Next @@ -402,23 +357,22 @@ Public Class formBackglass B2SStatistics.ClearAll() End Sub -#If B2S = "DLL" Then Private Sub formBackglass_Disposed(sender As Object, e As System.EventArgs) Handles Me.Disposed On Error Resume Next - If startupTimer IsNot Nothing Then RemoveHandler startupTimer.Tick, AddressOf StartupTimer_Tick If rotateTimer IsNot Nothing Then RemoveHandler rotateTimer.Tick, AddressOf RotateTimer_Tick +#If B2S = "DLL" Then If snifferTimer IsNot Nothing Then RemoveHandler snifferTimer.Tick, AddressOf SnifferTimer_Tick - + If startupTimer IsNot Nothing Then RemoveHandler startupTimer.Tick, AddressOf StartupTimer_Tick +#Else ' stop all timers as EXE - 'If timer IsNot Nothing Then RemoveHandler timer.Tick, AddressOf Timer_Tick - 'If tabletimer IsNot Nothing Then RemoveHandler tabletimer.Tick, AddressOf TableTimer_Tick + If timer IsNot Nothing Then RemoveHandler timer.Tick, AddressOf Timer_Tick + If tabletimer IsNot Nothing Then RemoveHandler tabletimer.Tick, AddressOf TableTimer_Tick 'If B2STimer IsNot Nothing Then RemoveHandler B2STimer.Tick, AddressOf B2STimer_Tick - 'If rotateTimer IsNot Nothing Then RemoveHandler rotateTimer.Tick, AddressOf RotateTimer_Tick +#End If End Sub -#End If #End Region #Region "painting" @@ -1756,8 +1710,7 @@ Public Class formBackglass B2SScreen.MakeScreenShot(filename, imageformat) My.Computer.Audio.Play(My.Resources.camera1, AudioPlayMode.Background) End If -#If B2S = "DLL" Then -#Else +#If B2S = "EXE" Then ElseIf e.KeyCode = Keys.Escape Then ' stop the app @@ -2968,18 +2921,14 @@ Public Class formBackglass End If Next End If -#If B2S = "DLL" Then - Me.TopMost = True - Me.BringToFront() - Me.TopMost = False -#Else + +#If B2S = "EXE" Then Using regkey As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\B2S", True) regkey.SetValue("B2SSetSwitch", If(animationpulseswitch, 1, 0), RegistryValueKind.DWord) End Using #End If End If - ' set info flags to dirty to load them #If B2S = "DLL" Then B2SData.IsInfoDirty = True @@ -3534,16 +3483,15 @@ Public Class formBackglass Return Drawing.Color.FromArgb(CInt(colorvalues(0)), CInt(colorvalues(1)), CInt(colorvalues(2))) End Function -#If B2S = "EXE" Then Private Sub SetFocusToVPPlayer() ' set focus to the VP player Dim proc As Processes = New Processes() SetForegroundWindow(proc.TableHandle) +#If B2S = "EXE" Then tableHandle = proc.TableHandle - - End Sub #End If + End Sub Private Function RandomStarter(ByVal top As Integer) As Integer diff --git a/b2sbackglassserver/b2sbackglassserver/Forms/formDMD.vb b/b2sbackglassserver/b2sbackglassserver/Forms/formDMD.vb index 11e8a41..179c24e 100644 --- a/b2sbackglassserver/b2sbackglassserver/Forms/formDMD.vb +++ b/b2sbackglassserver/b2sbackglassserver/Forms/formDMD.vb @@ -72,7 +72,6 @@ Public Class formDMD Private Sub formDMD_MouseClick(sender As Object, e As MouseEventArgs) Handles MyBase.MouseClick If e.Button = Windows.Forms.MouseButtons.Right Then B2SScreen.formBackglass.formBackglass_MouseClick(sender, e) - 'formBackglass.formBackglass_MouseClick(sender, e) End If End Sub diff --git a/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.Designer.vb b/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.Designer.vb index 1225976..89ccde4 100644 --- a/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.Designer.vb +++ b/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.Designer.vb @@ -29,7 +29,6 @@ Partial Class formSettings Me.lowerPanel = New System.Windows.Forms.Panel() Me.btnCloseSettings = New System.Windows.Forms.Button() Me.btnSaveSettings = New System.Windows.Forms.Button() - Me.lblNonAvailableSettings = New System.Windows.Forms.Label() Me.btnEditScreenRes = New System.Windows.Forms.Button() Me.btnMore = New System.Windows.Forms.Button() Me.headerPanel = New System.Windows.Forms.Panel() @@ -127,27 +126,26 @@ Partial Class formSettings Me.PanelSettings.Location = New System.Drawing.Point(0, 0) Me.PanelSettings.Margin = New System.Windows.Forms.Padding(6) Me.PanelSettings.Name = "PanelSettings" - Me.PanelSettings.Size = New System.Drawing.Size(536, 693) + Me.PanelSettings.Size = New System.Drawing.Size(536, 673) Me.PanelSettings.TabIndex = 2 ' 'lowerPanel ' Me.lowerPanel.Controls.Add(Me.btnCloseSettings) Me.lowerPanel.Controls.Add(Me.btnSaveSettings) - Me.lowerPanel.Controls.Add(Me.lblNonAvailableSettings) Me.lowerPanel.Controls.Add(Me.btnEditScreenRes) Me.lowerPanel.Controls.Add(Me.btnMore) Me.lowerPanel.Dock = System.Windows.Forms.DockStyle.Bottom - Me.lowerPanel.Location = New System.Drawing.Point(0, 620) + Me.lowerPanel.Location = New System.Drawing.Point(0, 624) Me.lowerPanel.Name = "lowerPanel" - Me.lowerPanel.Size = New System.Drawing.Size(536, 73) + Me.lowerPanel.Size = New System.Drawing.Size(536, 49) Me.lowerPanel.TabIndex = 42 ' 'btnCloseSettings ' Me.btnCloseSettings.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.btnCloseSettings.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.btnCloseSettings.Location = New System.Drawing.Point(446, 37) + Me.btnCloseSettings.Location = New System.Drawing.Point(446, 13) Me.btnCloseSettings.Name = "btnCloseSettings" Me.btnCloseSettings.Size = New System.Drawing.Size(78, 24) Me.btnCloseSettings.TabIndex = 35 @@ -157,26 +155,17 @@ Partial Class formSettings 'btnSaveSettings ' Me.btnSaveSettings.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnSaveSettings.Location = New System.Drawing.Point(312, 37) + Me.btnSaveSettings.Location = New System.Drawing.Point(312, 13) Me.btnSaveSettings.Name = "btnSaveSettings" Me.btnSaveSettings.Size = New System.Drawing.Size(128, 24) Me.btnSaveSettings.TabIndex = 34 Me.btnSaveSettings.Text = "Save settings" Me.btnSaveSettings.UseVisualStyleBackColor = True ' - 'lblNonAvailableSettings - ' - Me.lblNonAvailableSettings.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.lblNonAvailableSettings.Location = New System.Drawing.Point(229, 16) - Me.lblNonAvailableSettings.Name = "lblNonAvailableSettings" - Me.lblNonAvailableSettings.Size = New System.Drawing.Size(295, 13) - Me.lblNonAvailableSettings.TabIndex = 40 - Me.lblNonAvailableSettings.Text = "* all settings in Italic is only available when run in EXE mode!" - ' 'btnEditScreenRes ' Me.btnEditScreenRes.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.btnEditScreenRes.Location = New System.Drawing.Point(91, 37) + Me.btnEditScreenRes.Location = New System.Drawing.Point(91, 13) Me.btnEditScreenRes.Name = "btnEditScreenRes" Me.btnEditScreenRes.Size = New System.Drawing.Size(99, 24) Me.btnEditScreenRes.TabIndex = 39 @@ -186,7 +175,7 @@ Partial Class formSettings 'btnMore ' Me.btnMore.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.btnMore.Location = New System.Drawing.Point(12, 37) + Me.btnMore.Location = New System.Drawing.Point(12, 13) Me.btnMore.Name = "btnMore" Me.btnMore.Size = New System.Drawing.Size(73, 24) Me.btnMore.TabIndex = 32 @@ -239,7 +228,7 @@ Partial Class formSettings Me.grpPlugins.Controls.Add(Me.chkShowStartupError) Me.grpPlugins.Controls.Add(Me.chkActivatePlugins) Me.grpPlugins.Controls.Add(Me.btnPluginSettings) - Me.grpPlugins.Location = New System.Drawing.Point(12, 533) + Me.grpPlugins.Location = New System.Drawing.Point(12, 535) Me.grpPlugins.Name = "grpPlugins" Me.grpPlugins.Size = New System.Drawing.Size(515, 75) Me.grpPlugins.TabIndex = 37 @@ -292,7 +281,7 @@ Partial Class formSettings 'chkDisableFuzzyMatching ' Me.chkDisableFuzzyMatching.AutoSize = True - Me.chkDisableFuzzyMatching.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.chkDisableFuzzyMatching.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.chkDisableFuzzyMatching.Location = New System.Drawing.Point(327, 23) Me.chkDisableFuzzyMatching.Name = "chkDisableFuzzyMatching" Me.chkDisableFuzzyMatching.Size = New System.Drawing.Size(134, 17) @@ -312,7 +301,6 @@ Partial Class formSettings 'chkStartAsEXE ' Me.chkStartAsEXE.Appearance = System.Windows.Forms.Appearance.Button - Me.chkStartAsEXE.Enabled = True Me.chkStartAsEXE.Location = New System.Drawing.Point(6, 20) Me.chkStartAsEXE.Name = "chkStartAsEXE" Me.chkStartAsEXE.Size = New System.Drawing.Size(151, 21) @@ -324,7 +312,6 @@ Partial Class formSettings 'cmbDefaultStartMode ' Me.cmbDefaultStartMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.cmbDefaultStartMode.Enabled = True Me.cmbDefaultStartMode.FormattingEnabled = True Me.cmbDefaultStartMode.Items.AddRange(New Object() {"Standard", "In EXE"}) Me.cmbDefaultStartMode.Location = New System.Drawing.Point(242, 20) @@ -524,7 +511,7 @@ Partial Class formSettings 'chkFormNoFocus ' Me.chkFormNoFocus.AutoSize = True - Me.chkFormNoFocus.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.chkFormNoFocus.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.chkFormNoFocus.Location = New System.Drawing.Point(441, 50) Me.chkFormNoFocus.Name = "chkFormNoFocus" Me.chkFormNoFocus.Size = New System.Drawing.Size(72, 17) @@ -796,7 +783,7 @@ Partial Class formSettings ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi - Me.ClientSize = New System.Drawing.Size(536, 693) + Me.ClientSize = New System.Drawing.Size(536, 673) Me.Controls.Add(Me.PanelSettings) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.KeyPreview = True @@ -894,7 +881,6 @@ Partial Class formSettings Friend WithEvents btnEditScreenRes As Windows.Forms.Button Friend WithEvents lblBackground As Windows.Forms.Label Friend WithEvents cmbBackground As Windows.Forms.ComboBox - Friend WithEvents lblNonAvailableSettings As Windows.Forms.Label Friend WithEvents B2SLogoToolTip As Windows.Forms.ToolTip Friend WithEvents lowerPanel As Windows.Forms.Panel Friend WithEvents headerPanel As Windows.Forms.Panel diff --git a/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.resx b/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.resx index 3fc5ee6..3626916 100644 --- a/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.resx +++ b/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.resx @@ -124,7 +124,7 @@ iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL - EAAACxABrSO9dQAAHIZJREFUeF7tWQdYlOeyPhuUsp26lO27wNJ7L9LLAtJ7EUVAY1eiETR2jb0TBRVR + DwAACw8BkvkDpQAAHIZJREFUeF7tWQdYlOeyPhuUsp26lO27wNJ7L9LLAtJ7EUVAY1eiETR2jb0TBRVR LBELCoKACLajGFs0ydHEaGLUJDaMJ4pImTvfuhBWjfHec03OPc+d53mfXfb//vln3plvZr6fv/3V0paR T0G8pwRF+fO/l7Sl5lEQam1peRoI5sPUXM5PyTmiH1NyzBCSe2m5hm3pefS2jLwBylveKG2Z6GxmPvXn tOHcc9FpDiciEn1ORiR5XUnIsnqQkaeL195KDxF8LgVt6oPy5/+ZtCXnvodQa0vJVUdootP0e8nDDc9H diff --git a/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.vb b/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.vb index fe0b454..54cc147 100644 --- a/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.vb +++ b/b2sbackglassserver/b2sbackglassserver/Forms/formSettings.vb @@ -37,11 +37,9 @@ Public Class formSettings Return Name + If(SlowDown = 1, "", " (" & If(SlowDown = 0, "Off", SlowDown.ToString & "x") & ")") End Function End Class -#If B2S = "DLL" Then + Private Sub formSettings_Load(sender As System.Object, e As System.EventArgs) Handles Me.Load -#Else - Private Sub formSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load -#End If + formSettingsMore = New formSettingsMore(Me, formBackglass) ' load data @@ -157,11 +155,8 @@ Public Class formSettings TimerOpacity.Start() End Sub -#If B2S = "DLL" Then + Private Sub formSettings_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp -#Else - Private Sub formSettings_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp -#End If If e.KeyCode = Keys.Escape OrElse e.KeyCode = Keys.S Then btnCloseSettings.PerformClick() End If diff --git a/b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb b/b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb index 0c323e5..43b3336 100644 --- a/b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb +++ b/b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb @@ -1,5 +1,4 @@ -Imports System -Imports System.Reflection +Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following