如何在Delphi XE2中为平板电脑固定表格? [英] How can I fixate form for tablet PC in Delphi XE2?
问题描述
我有问题。我在Delphi XE2中创建一个全屏表单。然后,我在装有Windows 7平板电脑的平板电脑上运行应用程序,屏幕分辨率为1024x600。然后,我旋转Tablet PC(现在的分辨率为600x1024),并且表单上的元素出现了一些问题(某些按钮在屏幕后面,等等)。我可以配置项目以便在我打开平板电脑时不旋转它吗?
I have a problem. I create a fullscreen form in Delphi XE2. Then I run my application on tablet PC with windows 7 on board where screen resolution is 1024x600. Then I rotate tablet PC (now resolution is 600x1024) and I had some problems with elements on form (some buttons are behind the screen, etc.). Can I configure project so that when I turn the tablet PC my form is not rotate?
推荐答案
根据此 MSDN文章,您可以通过听 WM_DISPLAYCHANGE
消息。
According to this MSDN article you can detect that the screen has been rotated by listening for the WM_DISPLAYCHANGE
message.
但是,您随后面临一个严重的问题。现在,您需要旋转90度来绘制整个应用程序。这将需要做很多事情。老实说,我不认为这是一个易于解决的解决方案。我怀疑可行的选择是:
However, you then face a serious problem. You now need to paint your entire app with a 90 degree rotation. That's going to take quite a bit of doing. I honestly don't believe it to be a tractable solution. I suspect that the viable options are to:
- 修改程序,使其在两个方向均可工作,或者
- 配置设备,使其始终处于您喜欢的方向。
这篇关于如何在Delphi XE2中为平板电脑固定表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!