Windows Mobile ShowDialog form's title bar is not visible
In my Windows Mobile project, I have a form (let's call it form M to help keep thing straight) that I need to display modally, so I am using the ShowDialog method on a new copy of the form. When I show it from a form (form A) that takes up the whole screen (WindowState Maximized, Location 0,0, all other properties default except for name, the designer picks this up and shows it without a title bar), it shows up fine with the title bar intact.
However, if I display another modal window on top of this form (form B) that takes up the whole screen and uses the same form properties as form A, and then try to show the modal dialog form M from that form, the title bar is not visible and I can see the top part of form B behind it. Form M also has all default properties except for ControlBox False, and as such shows up in the designer with the title bar.
Any ideas as to 开发者_如何学Gowhat to look for? I have tried just about every combination of manipulating the properties of the parent and modal forms (WindowState, FormBorderStyle, ControlBox, TopMost, etc.) and have not found a combination that works yet.
It exhibits the same behavior both in the Windows Mobile 6 Classic emulator and on my device.
Here is what the form M is supposed to look like, which it does when shown on top of form A:
Good Form http://imagebin.antiyes.com/images/0710161001266357909_33.png
And when form M is displayed on top of form B (and form A):
Bad Form http://imagebin.antiyes.com/images/0020949001266357931_33.png
(These screen captures are taken from my Dell Axim X51V, which has a 480x640 screen.)
This project worked fine in the past, I just converted it from VS2005 to VS2008, and I am wondering of something in the conversion is causing this to happen.
EDIT: I noticed that this is happening with other forms with title bars in my application that try to show on top of form B, and it is exhibiting the same behavior. If when this happens, I press the Calendar hardware button to open up the calendar application, and then press Ctrl+Q (I am using MyMobiler for screen shots and keyboard control of the device), the Calendar window goes away and the form M shows up, this time with the title bar showing just fine.
精彩评论