windows mobile 6中MessageBox.Show()调用的参数问题!

caymanyang 2009-09-28 05:05:44
我用的是windows mobile 6的系统,但是调用MessageBox这个函数却无法使用后面两个参数即:MessageBoxButtons,MessageBoxIcon.
程序中也无法包含System.Windows.Forms.MessageButtons..这个命名空间。
但是我的系统里其他的程序(windows mobile自带的应用程序)却可以弹出带按钮的消息框,请问各位达人谁知道怎么解决?
...全文
100 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
91program 2012-07-25
  • 打赏
  • 举报
回复
解决了就结帖吧,LZ~!
董事长Kevin 2012-07-24
  • 打赏
  • 举报
回复
解决方案如下:谢谢大家支持

MessageBox.Show("我的博客地址?", "http://www.guowenke.tk", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);

董事长Kevin 2012-07-24
  • 打赏
  • 举报
回复
楼主是如何解决问题de ?求指教
danyingjie 2009-10-08
  • 打赏
  • 举报
回复
描述的不是很清楚 帮顶了
http://blog.csdn.net/xiaoxiao108/article/details/7226120 前些天,12306这个网站挺火的,看到网上出现了各种各样的登陆、订票插件跟程序。虽然没经历过春运,看到网上各种各样的插件跟工具挺有意思的,下载了几个看了看,都挺不错的。印象有个java版本的订票程序里面有个验证码识别功能,用tesseract-ocr来识别验证码的,如果验证码不是很复杂识别效果还可以。 开发环境 vs2008 开发语言C# 使用方法很简单 1.下载tesseract 的.net 类库tessnet2_32.dll ,添加引用。 http://www.pixel-technology.com/freeware/tessnet2/ 2.下载tesseract 相对应的语言包。 http://code.google.com/p/tesseract-ocr/downloads/list 3.调用tesseract 的方法进行识别。 具体代码 1.读取网上的验证码到pictureBox //string url = "https://dynamic.12306.cn/otsweb/passCodeAction.do?rand=lrand"; string url = "http://static.baixing.net/pages/mobile.php?c=bcqsFelX+vKQcrnIbhyDYQ==/2.jpg"; HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; HttpWebResponse response = request.GetResponse() as HttpWebResponse; System.IO.Stream responseStream = response.GetResponseStream(); this.pictureBox1.Image = Image.FromStream(responseStream); 2.OCR类 public class Ocr { public void DumpResult(List result) { foreach (tessnet2.Word word in result) //Console.WriteLine("{0} : {1}", word.Confidence, word.Text); MessageBox.Show(string.Format("{0} : {1}", word.Confidence, word.Text)); } public List DoOCRNormal(Bitmap image, string lang) { tessnet2.Tesseract ocr = new tessnet2.Tesseract(); ocr.Init(null, lang, false); List result = ocr.DoOCR(image, Rectangle.Empty); DumpResult(result); return result; } System.Threading.ManualResetEvent m_event; public void DoOCRMultiThred(Bitmap image, string lang) { tessnet2.Tesseract ocr = new tessnet2.Tesseract(); ocr.Init(null, lang, false); // If the Oc
http://blog.csdn.net/xiaoxiao108/archive/2011/05/01/6381414.aspx 前段时间母亲手机遭贼了,以防万一,如果自己手机丢了,肯定会更郁闷,记得很多手机有防盗功能,如果更换了sim卡就会,手机就会自动把新的 sim卡手机号,gps坐标,什么的发送到绑定的手机上。网上查了下资料,这类这类软件也挺多的。看了看功能也不是很复杂,就自己写了个玩玩 。 开发环境 vs2008 wm6 .net cf 3.5 编译运行代码时,电脑必须安装 Windows Mobile 6 Professional SDK Refresh.msi 实现方法很简单 1.每一个sim都有唯一的一个IMSI编号,可以根据IMSI编号来判断手机是否更换sim卡 2.如果检测到IMSI不是自己的sim卡的,可以确定其他人可能在用你的手机。 3.每次开机程序自动运行,检测到别人如果使用你的手机,自动把他的通话记录,跟gps坐标发送到绑定好的手机号上。 4.知道用你手机人的手机号,最近通话记录,gps坐标后,再自己想办法找到这人吧。 具体代码 1.取sim卡IMSI编号 使用 TapiLib.dll类库的ControlTapi.GetIMSINumber()取到sim卡imsi编号 2.判断是不是自己的sim卡 string simStr=ControlTapi.GetIMSINumber(); if (simStr.Length != 0) { if (simStr != SIM) { 其SIM为事先取好的自己手机卡的IMSI编号 3.取最近通话记录代码 [StructLayout(LayoutKind.Sequential)] public struct CALLLOGENTRY { public UInt32 cbSize; public UInt64 ftStartTime; public UInt64 ftEndTime; public short iom; public bool fOutgoing; public bool fConnected; public bool fEnded; public bool fRoam; public short cidt; public IntPtr pszNumber; public IntPtr pszName; public IntPtr pszNameType; public IntPtr pszNote; }; [DllImport("phone.dll", EntryPoint = "PhoneOpenCallLog", SetLastError = true)] //首先要PhoneOpenCallLog打开通话记录句柄 private static extern int PhoneOpenCallLog(ref IntPtr pHandle); [DllImport("phone.dll", EntryPoint = "PhoneCloseCallLog", SetLastError = true)] //要调用PhoneCloseCallLog关闭句柄 private static extern int PhoneCloseCallLog(IntPtr pHandle); [DllImport("phone.dll", EntryPoint = "PhoneGetCallLogEntry", SetLastError = true)] private static extern int PhoneGetCallLogEntry(IntPtr pHandke, ref CALLLOGENTRY pEntry); //用PhoneGetCallLogEntry方法会返回一个通话记录结构,在该结构,包含号码、姓名、通话开始时间、通话结束时间等信息。 private string GetLog() { string CallInfo = ""; try { IntPtr handle = IntPtr.Zero; //句柄 CALLLOGENTRY entry = new CALLLOGENTRY(); PhoneOpenCallLog(ref handle); //首先要PhoneOpenCallLog打开通话记录句柄 entry.cbSize = (uint)Marshal.SizeOf(entry); //返回类的非托管大小 if (handle != IntPtr.Zero) { while (PhoneGetCallLogEntry(handle, ref entry) == 0) //获取通话记录 { //Marshal.PtrToStringUni 复制指定数目的字符 string phoneNumber = Marshal.PtrToStringUni(entry.pszNumber); //号码 string name = Marshal.PtrToStringUni(entry.pszName); //姓名 if (phoneNumber == null) { phoneNumber = string.Empty; } if (name == null) { name = string.Empty; } string temp = (phoneNumber.Trim() + name.Trim()); CallInfo = CallInfo + temp; } PhoneCloseCallLog(handle); if (CallInfo.Length < 140) { return CallInfo; } else { return CallInfo.Substring(0,140); } } else { int error = Marshal.GetLastWin32Error(); return ""; } } catch (Exception ep) { //MessageBox.Show(ep.ToString()); return ""; } finally { } } 4.取gps坐标代码 GpsDeviceState device = null; GpsPosition position = null; Gps gps = new Gps(); void gps_DeviceStateChanged(object sender, DeviceStateChangedEventArgs args) { device = args.DeviceState; } protected void gps_LocationChanged(object sender, LocationChangedEventArgs args) { position = args.Position; str = ""; if (position != null) { //维度 if (position.LatitudeValid) { str += position.Latitude; } //经度 if (position.LongitudeValid) { str += " " + position.Longitude; 5.发送短信代码 SmsMessage msg = new SmsMessage(PHONE, str); msg.Send(); 6.打包为开机启动程序 打包cab文件时,只需把快捷方式添加到Startup文件夹下面就ok。 不足之处。 1.gps代码根据sdk修改的,只是卫星定位的,根据基站定位的代码不知如何实现,只有当使用手机的人走到卫星信号好的地方时才能把坐标发 出去 2.发送的gps坐标 ,只是一个大体的位置,几百米以内的范围,有些浮动 3.如果手机被恢复出厂设置,或者被刷机,程序肯定不能运行了 即使gps信号不好的情况下只是得到使用手机人的电话号码,跟通话记录,用处也是挺大的。代码只是写着玩的,提供下参考思路代码 如果你发现有什么不合理的,需要改进的地方,或者你有什么更好的实现方法联系328452421@qq.com 朱晓 (泰山学院)。相互交流 谢谢 http://blog.csdn.net/xiaoxiao108/archive/2011/05/01/6381414.aspx

19,502

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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