Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将 MessageBox.Show() 与一条巨大的文本消息一起使用,因此消息窗口离开了屏幕。 有谁知道如何通过固定窗口的最大高度来避免这种丑陋的行为?
您应该创建一个自定义表单来显示自定义大小的 MessageBox。
我知道你有 WinForms,但我在我的 WPF 项目中做到了。
很确定 MessageBox 是固定大小的。可以将 Window.ShowDialog() 用于模式窗口。