在godot中获取窗口句柄? C#

发布于 2025-01-12 13:39:19 字数 108 浏览 3 评论 0原文

如何在 Godot (C# mono) 中获取窗口句柄

我已经成为 WPF 和 Winforms 开发人员相当长一段时间了,但我刚刚开始使用 Godot,我想知道因为我需要对窗口进行修改。

How do I get the window handle in Godot (C# mono)

I've been a WPF and Winforms developer for quite some time but I just started Godot and I am wondering since I need to make modifications to the window.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

极致的悲 2025-01-19 13:39:19

要获取 Godot 窗口的 hWnd,您可以使用以下函数:

OS.get_native_handle(OS.WINDOW_HANDLE)

在 C# 中,如下所示:

OS.GetNativeHandle(OS.HandleType.WindowHandle)

To get the hWnd of the Godot Window, you can use this function:

OS.get_native_handle(OS.WINDOW_HANDLE)

From C# that looks like this:

OS.GetNativeHandle(OS.HandleType.WindowHandle)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文