Delphi SDI 应用程序 - 不处理级联/平铺水平和平铺垂直平铺?
我的应用程序似乎没有接收或处理特定 Windows 版本上级联、水平平铺/垂直平铺的相同 Windows 消息。
Windows XP x32 - 不工作
Windows XP x64 - 未测试
Windows Vista x32 - 不工作
Windows Vista x64 - 工作正常?
Windows 7 x32 - 未测试
Windows 7 x64 - 不工作
任何人都知道为什么会出现这种情况?是否有任何特定于 Vista x64 的东西是其他人所没有的,我自己也不会这么认为!
更新
更具体地说,我指的是当我打开一个或多个应用程序实例时,我按住 Ctrl 键并从任务栏中选择这些实例,然后尝试级联/平铺。
在升级到 Delphi 2009 之前,我们的应用程序的旧版本似乎可以按预期工作。与此不同的是我们现在使用 DevExpress 功能区组件。更令人沮丧的是,我们还有另一个版本的应用程序,它位于 Delphi 2009 中,并且使用功能区并且工作正常!
My application doesn't seem to receive or handle the same windows messages for the Cascade, Tile Horizontal/Tile Vertical on specific windows versions.
Windows XP x32 - Not working
Windows XP x64 - Not tested
Windows Vista x32 - Not working
Windows Vista x64 - Works fine??
Windows 7 x32 - Not tested
Windows 7 x64 - Not working
Anyone any idea's as to why this may be the case? Is there anything specific to Vista x64 that isn't with the others, I wouldn't have thought so myself!
Update
More specifically I am referring to when I have one or more instances of my application open and I hold Ctrl and select these from the task bar and then try to Cascade/Tile.
Older versions of our application prior to upgrading to Delphi 2009 seem to work as expected. Differences from this is we are now using the DevExpress ribbon components. Even more frustratingly is we have another version of the application which is in Delphi 2009 and using the ribbons and that works fine!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您正在谈论 Delphi 的 TForm.Cascade 和 TForm.Tile 方法,请参阅文档(Delphi 7,因为它很方便):
如您所见,它们仅针对 MDI 子窗体而设计;它们对非 MDI 子窗体没有影响。这可能可以解释为什么它们不能在您测试过的四个操作系统中的三个上运行。 (我怀疑 Vista x64 的工作是某种侥幸。)
编辑:根据评论,问题与 TForm.Cascade/Tile 无关。
不过,我认为克雷格·杨走在正确的道路上。您是否尝试过添加
到 .DPR 文件?我认为问题可能是,在早期版本的 Delphi 中启动然后更新到较新版本的项目中,未设置该标志,并且应用程序的窗口放在任务栏上。将其更改为主窗体可能会解决问题。
If you're talking about Delphi's TForm.Cascade and TForm.Tile methods, from the documentation (Delphi 7, as it was handy):
As you can see, they're only designed for MDI child forms; they have no effect on non-MDI child forms. That might explain why they're not working on three of the four OS's you've tested on. (I'd suspect the Vista x64 working is a fluke of some kind.)
EDIT: Based on the comment, the problem isn't related to TForm.Cascade/Tile.
I think Craig Young is on the right track, though. Have you tried adding
to the .DPR file? I think the issue may be that, on projects started in earlier versions of Delphi and then updated to newer versions, the flag isn't set and the Application's window is what's put on the taskbar. Changing it to the main form instead may fix the issue.
一个简单的 Delphi 应用程序有两个“主”句柄。一个用于主窗体,另一个用于 TApplication 实例。
就我个人而言,我不使用在桌面上平铺或级联应用程序的功能(我更喜欢最大化运行)。因此,我从来没有费心去研究这种行为。但我可以给出一些指示:
A simple Delphi app has two 'main' handles. One is for the main form, and the other for the TApplication instance.
Personally I don't use the functionality to tile or cascade applications on the desktop (I prefer to run things maximised). Consequently, I've never bothered to dig around with that behaviour. But I can give some pointers: