From 114e459577728fa707114f59dc8522f4872585ec Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 21 Apr 2021 14:35:33 +0200 Subject: [PATCH] Fix Scaling Factor calculation --- Global_Indexer/frmIndex.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index 7340393..40bfb4e 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -1540,6 +1540,7 @@ Public Class frmIndex ShowErrorMessage(ex, "Form Open") End Try End Sub + Sub Load_String() Try Me.VWDDINDEX_MANTableAdapter.Connection.ConnectionString = MyConnectionString @@ -1718,11 +1719,15 @@ Public Class frmIndex Private Sub LoadIndexe_Man() Try - Dim oDpiscale = DigitalData.Modules.Windows.Screen.GetScalingFactor() + Dim oScreen As New DigitalData.Modules.Windows.Screen() + Dim oDpiscale = oScreen.GetScreenScaling(Me) + Dim oControlCount As Integer = 1 Dim oLabelPosition As Integer = 11 * oDpiscale Dim oControlPosition As Integer = 33 * oDpiscale + _Logger.Info("Loading Indicies for Screen Scaling Factor [{0}]", oDpiscale) + Dim oControls As New ControlCreator(LOGCONFIG, pnlIndex, Me) With { .OnControlChanged = AddressOf PrepareDependingControl, .OnLookupData = AddressOf GetLookupData