File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 5454
5555 <application xmlns =" urn:schemas-microsoft-com:asm.v3" >
5656 <windowsSettings >
57- <dpiAware xmlns =" http://schemas.microsoft.com/SMI/2005/WindowsSettings" >true/pm</dpiAware >
5857 <dpiAwareness xmlns =" http://schemas.microsoft.com/SMI/2016/WindowsSettings" >PerMonitorV2</dpiAwareness >
5958 <longPathAware xmlns =" http://schemas.microsoft.com/SMI/2016/WindowsSettings" >true</longPathAware >
6059 </windowsSettings >
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >WinExe</OutputType >
5- <TargetFramework >net8 .0-windows8.0</TargetFramework >
5+ <TargetFramework >net9 .0-windows8.0</TargetFramework >
66 <UseWPF >true</UseWPF >
77 <UseWindowsForms >true</UseWindowsForms >
8+ <ApplicationHighDpiMode >PerMonitorV2</ApplicationHighDpiMode >
89 <Nullable >enable</Nullable >
910 <RootNamespace >AlterApp</RootNamespace >
1011 <ApplicationManifest >Resources\app.manifest</ApplicationManifest >
1112 <ApplicationIcon >Resources\alter.ico</ApplicationIcon >
1213 <GenerateAssemblyInfo >true</GenerateAssemblyInfo >
1314 <IncludeSourceRevisionInInformationalVersion >true</IncludeSourceRevisionInInformationalVersion >
1415 <PublishReadyToRun >true</PublishReadyToRun >
15- <NoWarn >$(NoWarn);WFAC010 </NoWarn >
16+ <NoWarn >$(NoWarn)</NoWarn >
1617 </PropertyGroup >
1718
1819 <PropertyGroup >
Original file line number Diff line number Diff line change 1- using MsRdcAx . AxMsTscLib ;
1+ using System ;
2+ using MsRdcAx . AxMsTscLib ;
23
34namespace MsRdcAx
45{
@@ -16,8 +17,15 @@ public double GetDesktopScaleFactor()
1617
1718 public void SetRdpExtendedSetting ( string propertyName , object propertyValue )
1819 {
19- var rdpExtendedSettings = ( MSTSCLib . IMsRdpExtendedSettings ) this . GetOcx ( ) ;
20- rdpExtendedSettings . set_Property ( propertyName , ref propertyValue ) ;
20+ var rdpExtendedSettings = this . GetOcx ( ) as MSTSCLib . IMsRdpExtendedSettings ;
21+ if ( rdpExtendedSettings != null )
22+ {
23+ rdpExtendedSettings . set_Property ( propertyName , ref propertyValue ) ;
24+ }
25+ else
26+ {
27+ throw new InvalidOperationException ( $@ "Failed to cast to IMsRdpExtendedSettings for property ""{ propertyName } "".") ;
28+ }
2129 }
2230 }
2331}
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >net8 .0-windows8.0</TargetFramework >
4+ <TargetFramework >net9 .0-windows8.0</TargetFramework >
55 <UseWPF >true</UseWPF >
66 <UseWindowsForms >true</UseWindowsForms >
77 <Nullable >enable</Nullable >
You can’t perform that action at this time.
0 commit comments