How can I fixate form for tablet PC in Delphi XE2?

爱⌒轻易说出口 提交于 2019-12-07 12:05:19

问题


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?


回答1:


According to this MSDN article you can detect that the screen has been rotated by listening for the WM_DISPLAYCHANGE message.

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:

  • Modify your program so that it works in both orientations, or
  • Configure the device so that it is always in your preferred orientation.


来源:https://stackoverflow.com/questions/27278525/how-can-i-fixate-form-for-tablet-pc-in-delphi-xe2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!