wince VS2008 C# PreProcessMessage问题

LZNJ06 2013-11-04 03:36:42
在wince 系统VS2008下 C# 开发问题

using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PanDian
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

}

public override bool PreProcessMessage(ref Message msg)
{
return base.PreProcessMessage(ref msg);
}

}
}
编译提示:...\Form1.cs(22,52): 错误 CS0246: 找不到类型或命名空间名称“Message”(是否缺少 using 指令或程序集引用?)
谢谢大家。
...全文
436 13 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
LZNJ06 2013-11-14
  • 打赏
  • 举报
回复
liangzhonglin 给了最高分,但讲的方法我没有验证。我想应该是可以的。谢谢liangzhonglin
LZNJ06 2013-11-14
  • 打赏
  • 举报
回复
好的,谢谢各位。 我最后是在textbox 的添加downkey 消息解决了。谢谢。
小二码农 2013-11-05
  • 打赏
  • 举报
回复
.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); } }
LZNJ06 2013-11-05
  • 打赏
  • 举报
回复
基本上全写了。 public override bool PreProcessMessage(ref Message msg) 就是这行提示出错的。
风一样的大叔 2013-11-05
  • 打赏
  • 举报
回复
楼主代码没全贴,而且没有告诉我是哪一行出错的
LZNJ06 2013-11-05
  • 打赏
  • 举报
回复
这个错误提示 只在WINCE 系统下才出现,在WCF 桌面工程中并没有出现。
LZNJ06 2013-11-05
  • 打赏
  • 举报
回复
大家帮忙看看,到底是什么情况呢。
LZNJ06 2013-11-04
  • 打赏
  • 举报
回复
我的电脑系统是win7 64位系统。 microsoft visual studio 2008 版本9.0.30729.1SP(C) 2007 Microsoft Corporation microsoft .net framework 版本 3.5SPI
熙风 2013-11-04
  • 打赏
  • 举报
回复
可能跟你系统有关,我用VS08没报错
LZNJ06 2013-11-04
  • 打赏
  • 举报
回复
.net framework什么版本?试试3.0 3.0 试了还是一样的错误提示
LZNJ06 2013-11-04
  • 打赏
  • 举报
回复
.net framework 3.5 的版本
feiyun0112 2013-11-04
  • 打赏
  • 举报
回复
.net framework什么版本?试试3.0

111,094

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧