【WPF】如何引用System.Windows.Forms;

修改项目的csproj文件

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0-windows</TargetFramework>
    <Nullable>enable</Nullable>
    <UseWPF>true</UseWPF>
    <UseWindowsForms>true</UseWindowsForms>
  </PropertyGroup>

添加<UseWindowsForms>true</UseWindowsForms>

posted @ 2023-11-26 11:39  yzhyingcool  阅读(296)  评论(0编辑  收藏  举报