0
votes

I am writing Windows Mobile 6.5 Application for the first time for Motorola MC75 Devices.

I am using UserControls for each screens, and single "HomeForm", Problems I am facing are:-

  • No Close button anwhere on device.
  • No Keyboard (Input Panel) though I have written code using InputPanel on textbox got focus event but it is not working.

On Emulator both close button and keyboard panel shows-up.

following is the code which I uses to setup new UserControl and shows :

  public static HomeForm HomeFormGet(string ControlName, object viewModel)
        {
            if (homeForm == null)
            {
                homeForm = new HomeForm();
            }
            BaseUserControl prevUserControl = homeForm.ActiveUserControl;

            homeForm.ActiveUserControl = getUserControl(ControlName, homeForm);

            if (viewModel != null)
            {
                homeForm.ActiveUserControl.Model = viewModel;
            }
            homeForm.ActiveUserControl.DBName = DBName;
            homeForm.ActiveUserControl.UserName = UserName;
            if (!string.IsNullOrEmpty(homeForm.ActiveUserControl.PrevUserControlName) && homeForm.activeUserControl.PrevUserControlName == prevUserControl.Name)
            {
                homeForm.activeUserControl.PrevUserControl = prevUserControl;
            }
            else
            {
                foreach (UserControl uCtl in controlsCache)
                {
                    if (homeForm.activeUserControl.PrevUserControlName == uCtl.Name)
                    {
                        homeForm.activeUserControl.PrevUserControl = (BaseUserControl)uCtl;
                        break;
                    }
                }
            }
            homeForm.ActiveUserControl.Location = new Point(0, 0);

            //homeForm.activeUserControl.Size = new Size(homeForm.Width, homeForm.activeUserControl.Height);
            //homeForm.activeUserControl.Dock = DockStyle.Fill;

            homeForm.AutoScroll = true;

            homeForm.ActiveUserControl.Show();

            return homeForm;
        }
1
There's not enough here to know exactly, but check your form properties for ControlBox, MaximizeBox, and MinimizeBox, should be true. I tried an empty hellow world on my MC75 and the Close/Minimize box showed on the bottom right. I'm wondering if your form is covering them at the bottom of the screen where WM 6.5 puts them?Damon8or
I checked for all the property u mentioned, and ensured that all those are true. one strange thing, I did not have "MaximizeBox" property on forms, (which might be the case for WiMo apps), It seems my app eaten up all the spaces at bottom,and have lots of controls, though i ensured by reducing form & User-control sizes, but still nothing at lower corner of screen.Anand
Can you post the code from a single form that suffers this problem? I don't need any of the application logic or code, just the constructor, _Load handler, and designer code. You might also override OnResize and trace the dimensions of your form when it's resized.Damon8or

1 Answers

0
votes

Does your homeform runs maximized?