【问题标题】:How can I use the windows form application on macOS? [duplicate]如何在 macOS 上使用 windows 窗体应用程序? [复制]
【发布时间】:2022-01-10 05:08:14
【问题描述】:

我被要求在 vs 代码中使用 c#-windows form application(.net) 设计我的第一个完整游戏,但我使用的是 macOS。如何在 macOS 上使用 windows 窗体应用程序?

【问题讨论】:

  • WinForms 在 Win32 API 中使用 GDI。您可以通过安装Wine 来使其工作,这是一个适用于 Linux、macOS 和 BSD 的兼容层。
  • 为了避免在死胡同上浪费时间,如果只允许您使用 WinForms,请拿起一台 Windows 机器并在那里处理您的 WinForms 项目。忘掉 Wine,因为现实世界的不兼容,它只会让你到处乱跑(但它声称是兼容的)。

标签: c# windows macos forms


【解决方案1】:

据我所知,您只能在 Windows 中使用 WPF 和 WinForms。 您还应该阅读 .NET MAUI,它是一个新框架,允许您为 iOS、Android、macOS、Windows 开发 WPF 和 WinForms。 https://docs.microsoft.com/en-us/dotnet/maui/what-is-maui 它是 Visual Studio 2022 和 .NET 6 的一项新技术。 您还可以阅读有关 Unity 引擎的信息,因为它是为创建游戏而创建的。 https://unity.com/

【讨论】:

猜你喜欢
  • 2018-01-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多