wince VS2008 C# PreProcessMessage问题 WINCE VS2008 C# PreProcessMessage 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 .net framework什么版本?试试3.0 .net framework 3.5 的版本 .net framework什么版本?试试3.03.0 试了还是一样的错误提示 我的电脑系统是win7 64位系统。 microsoft visual studio 2008 版本9.0.30729.1SP(C) 2007 Microsoft Corporation microsoft .net framework 版本 3.5SPI 这个错误提示 只在WINCE 系统下才出现,在WCF 桌面工程中并没有出现。 基本上全写了。 public override bool PreProcessMessage(ref Message msg) 就是这行提示出错的。 .net cf 不支持这个属性,在cf中对消息的支持不是太好,接收消息需要使用以下的方法来按收,定义一个类从messagewindow继承,通过这个类来接收消息,反射给form处理public class ScanWindow2350 : MessageWindow { public event FrontLinkDriver.Interface.ScanEventHandler AppRead = null; CBarcode m_barcode = new CBarcode(); protected override void WndProc(ref Message msg) { switch (msg.Msg) { case 2350.WM_BARCODE_COMPLETE: { char[] cChar1 = new char[1024]; UInt32 nResult = Partner2350.BCRReadString(cChar1, 1024); string barcode = new string(cChar1); if (AppRead != null && barcode != null) { if (barcode.Length > 0) { m_barcode.barcode = barcode; m_barcode.type = SCANNERBARCODETYPE.NONE; AppRead(m_barcode); } } } break; default: break; } base.WndProc(ref msg); } } 好的,谢谢各位。我最后是在textbox 的添加downkey 消息解决了。谢谢。 liangzhonglin 给了最高分,但讲的方法我没有验证。我想应该是可以的。谢谢liangzhonglin 大家看看这个函数返回值问题 c#去掉xml里所有节点边名称空间 不显示删除回复显示所有回复显示星级回复显示得分回复 帖子分页后,楼层又从一楼开始 等 问题 方法返回值有错?帮我看看 请问装饰器模式的好处体现在哪里? 请教:不通过数据库保存数据的问题。 第三方控件是不是只要引用一下就可以啦? 如何指定FOMR中的多个控件的某一个控件得到焦点 两个小问题 怎样修改datagrid中各列的显示宽度? c# 窗体控件自动调节大小,同时字体随之变化. C# Excel COM插件开发 多线程问题(急急急,求高手指点)
public class ScanWindow2350 : MessageWindow
{
public event FrontLinkDriver.Interface.ScanEventHandler AppRead = null;
CBarcode m_barcode = new CBarcode();
protected override void WndProc(ref Message msg)
{
switch (msg.Msg)
{
case 2350.WM_BARCODE_COMPLETE:
{
char[] cChar1 = new char[1024];
UInt32 nResult = Partner2350.BCRReadString(cChar1, 1024);
string barcode = new string(cChar1);
if (AppRead != null && barcode != null)
{
if (barcode.Length > 0)
{
m_barcode.barcode = barcode;
m_barcode.type = SCANNERBARCODETYPE.NONE;
AppRead(m_barcode);
}
}
}
break; default:
break; } base.WndProc(ref msg);
}
}
我最后是在textbox 的添加downkey 消息解决了。谢谢。