【问题标题】:NotSupportedException when creating button with .NET CF on CE5 device?在 CE5 设备上使用 .NET CF 创建按钮时出现 NotSupportedException?
【发布时间】:2009-06-08 14:17:08
【问题描述】:

我有一个在 WinCE 和 WM 设备上运行良好的应用程序(到目前为止我已经测试过所有这些设备)。 我刚收到一个要测试的新设备,当设计人员在设备上创建按钮时,表单会抛出 NotSupportedException。

该设备是摩托罗拉 EWP2100 Wifi 手机。 根据其关于页面,它运行 WinCE 5

这是它抛出的完整异常

发生 System.NotSupportedException 消息="NotSupportedException" 堆栈跟踪: 在 Microsoft.AGL.Common.MISC.HandleAr() 在 System.Windows.Forms.Control._InitInstance() 在 System.Windows.Forms.Control..ctor() 在 System.Windows.Forms.ButtonBase..ctor() 在 System.Windows.Forms.Button..ctor() 在 SmartLane.Config.InitializeComponent() 在 SmartLane.Config..ctor() 在 SmartLane.MainForm.ShowConfig() 在 SmartLane.MainForm.MainForm_Load() 在 System.Windows.Forms.Form.OnLoad() 在 System.Windows.Forms.Form._SetVisibleNotify() 在 System.Windows.Forms.Control.set_Visible() 在 System.Windows.Forms.Application.Run() 在 SmartLane.Program.Main() 内部异常:

抛出它的代码在这里:

    private void InitializeComponent()
    {
        this.label1 = new System.Windows.Forms.Label();
        this.txtServerAddress = new System.Windows.Forms.TextBox();
        this.btnOK = new System.Windows.Forms.Button(); //<---- THIS THROWS
        ...
    }

我知道这是一个非常具体的问题,但我以前从未遇到过这个问题,异常并没有真正让我知道这里出了什么问题。

感谢任何意见或建议。 谢谢

【问题讨论】:

    标签: .net winforms compact-framework


    【解决方案1】:

    您可能正在使用不支持按钮的智能手机(标准)SDK。

    另见question

    【讨论】:

    • 罗弗。阅读链接后,我什至从未考虑过用户如何按下屏幕上的按钮。谢谢!
    • 他们使用按钮的方式与在 PC 上不使用鼠标的人使用按钮的方式相同:将焦点移到按钮上,然后按 ENTER(或手机上标记的任何内容) .我理解他们为什么把它拿出来,但他们应该把它留在里面。
    • @MusiGenesis:CF 团队显然无法看到所有树木都看到森林的众多地方之一。
    • 不使用按钮使应用程序与内置 UI 保持一致。对于只拥有 Windows Mobile 设备的用户来说,这是有意义的。用过其他手机的人觉得这很奇怪。我不得不实现我自己的 Button 一次,因为客户端要求 J2ME 应用程序到 Windows Mobile 的确切端口。我想这一直在发生。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-06
    • 1970-01-01
    • 2011-09-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多