Windows Mobile 6.5 Motorola MC75 无输入面板和关闭按钮
我正在第一次为 Motorola MC75 设备编写 Windows Mobile 6.5 应用程序。
我在每个屏幕上使用 UserControls,并且使用单个“HomeForm”,我面临的问题是:-
- 设备上没有关闭按钮。
- 虽然我没有键盘(输入面板) 已经在文本框上使用 InputPanel 编写了获得焦点事件的代码,但它 不工作。
在模拟器上,关闭按钮和键盘面板都会显示。
以下是我用来设置新 UserControl 的代码并显示:
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;
}
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;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 Homeform 是否最大化运行?
Does your homeform runs maximized?