微软.net精简框架常见问题及回答(中文版) (转)

微软.net精简框架常见问题及回答(中文版) (转)[@more@] FastCounter by bCentral
CSS rel=Stylesheet>

最常见问题(FAQ)


微软 .NET精简 框架最常见问题。

此FAQ的内容,一部分来自 microsoft.public.dotnet.framework.compactframework/">net精简框架新闻组 (microsoft.public.dotnet.framework.compactframework)张贴和回答的问题。.net精简框架开发小组感谢每一位参与新闻组的人事,感谢他们对FAQ编写的积极参与和对FAQ的投稿。

要申请添加FAQ项目,请发邮件Mailto:netcffaq@microsoft.com" rel="nofollow">netcffaq@microsoft.com.

1. 开发

1.1. 什么是微软 .net精简框架?
1.2. 我需要什么工具才能开发.net精简框架的应用?
1.3. 哪里可以 下载最新的工具和相关 软件
1.4. .net精简框架支持些什么设备?
1.5. .net精简框架以后将支持什么设备?
1.6. 调试 程序时为什么会出现“与模拟器建立连接失败”的错误(刚开始 执行程序的时候)?
1.7. .net框架和.net精简框架之间有什么区别?
1.8. .net精简框架的 补丁有什么改进?
1.9. Poclet PC上的.net精简框架开发和 windows CE .NET上的.net精简框架开发有什么不同?
1.10. 哪里有更多的关于建立.net精简框架上的应用程序的信息?
1.11. .net精简框架的文档在哪里?
1.12. 怎样设置才不会在每次调试的时候把所涉及的 文件都拷贝到设备上?
1.13. 怎样设置模拟器的属性?
1.14. 怎么调试.net精简框架的应用程序?
1.15. 怎样开始使用 Visual Basic .NET开发.net精简框架的程序?
1.16. 怎样才能把.net精简框架 安装到装配集中(GAC)?
1.17. 当从 Visual Studio .NET 2003中发布程序到设备上的时候,怎样处理"Sharing Violation"?
1.18. 什么是common language runtime (CLR)?
1.19. 什么是Global Assembly Cache (GAC)?
1.20. 在.net精简框架下 内存管理是怎样的?
1.21. 当我的 网络 协议数超过50个的时候,为什么不能向发布程序?
1.22. 为什么会有跨平台代码?
1.23. 这些ARM指令代表什么?
1.24. 怎样写注册表?
1.25. How can I prevent .CAB files from being deleted after installation?
1.26. How can I dete Rmine the version of the .NET Compact Framework that is installed on a device?
1.27. How do I copy files to the emulator?
1.28. Why does installation of the PocketPC 2002 SDK fail?
1.29. How do I de bug a web service consumed by a Smart Device application?
1.30. What is the footprint of the .NET Compact Framework?
1.31. How do I include imgdecmp.dll in an emulator image?
1.32. How do I programmatically replace Assemblies in the Global Assembly Cache (GAC)?
1.33. How can I display Pocket PC applications on my desktop or laptop without needing any device s ide configuration?
1.34. How can I allow Activesync to connect to an Emulator session from Visual Studio .NET 2003?
1.35. How can I copy files to the device currently connected to desktop ActiveSync?
1.36. How can I stress test user input?
1.37. Where can I get a UI version of the Platfo RM Builder Target Control Window?
1.38. Where can I get a Command shell for Pocket PC 2003 devices?
1.39. How can I get detailed information about currently running processes?
1.40. How can I remotely start an application on a Pocket PC from my desktop?
1.41. Why can't I load different assemblies with the same name?
1.42. How can I force Visual Studio .NET 2003 to connect to newer versions of the Pocket PC 2003 emulator?
1.43. Why don't my custom controls show up pro perly in the toolbox?
2. 图形
2.1. 怎样建立一个图形 对象
2.2. 怎样 优化GDI+?
2.3. 怎样在窗体上画一个图案?
2.4. 怎样画一个带有透明色的图案?
2.5. 为什么从TextBox上 调用CreateGraphics会失败?
2.6. 怎样获得屏幕上文字的大小?
2.7. Can I set the width of a pen?
2.8. How do I zoom an image?
2.9. Why can't I load an image?
3. 发布
3.1. 怎样建立一个PocketPC的设置程序?
3.2. 哪个发布包可以包括在我的安装程序中?
3.3. 怎样可以建立一个不需要.net框架的安装程序?
3.4. 怎样建立不受PocketPC 系统 约束的CAB安装文件?
3.5. 为什么不同的 处理器会有不同的CAB安装文件?
3.6. How do I create a desktop installer that detects the presence of the .NET Compact Framework on the target device and installs it if necessary?
3.7. How do I deploy a .NET Compact Framework Service Pack to the emulator?
3.8. How do I include sql SERVER CE with my application installation?
3.9. How do I use G api to create a graphics engine?
4. 图形 用户界面(GUI): 窗体
4.1. 怎样建立一个全屏的窗体?
4.2. 什么时候用窗体的构造器?什么时候用窗体的Load事件?
4.3. 怎样把最小化按钮换成关闭按钮?
4.4. 怎样在.net精简框架上建立多窗体系统结构?
4.5. 怎样提高.net精简框架应用程序的载入速度?
4.6. 运行时怎样修改窗体的风格?
4.7. 怎样滚动窗体的内容?
4.8. 怎样制作一个浮动的窗体?好象所有的窗体总是全屏状态的。
4.9. 怎样强迫一个窗体变成最小化?
4.10. 我有一个包含很多 控件的智能设备窗体,为什么运行的时候出现"NotSupportedException"错误?
4.11. 哪个是正确关闭窗体的方法:Appplication.Exit 还是 Form.Close ?
4.12. Why does showing a MessageBox on Windows Mobile 2003 for Smartphone with the Abort, Retry, and Fail set of buttons or the Yes, No, Cancel set of buttons, or the third button as the default button result in a NotSupportedException?
4.13 How do I get an icon in the Pocket PC Start Menu Most Recently Used (MRU) List?
4.14 How do I center a Form on the screen?
4.15 Why can't I show a Form that has been closed?
4.16 How can I enable multiple instances of an application?
5. 图形用户界面 (GUI): 通用
5.1. 怎样建立一个带有图形或支持多行的按钮?
5.2. TextBox.AcceptsReturn在.net精简框架下是怎样工作的?
5.3. 当数据载入ComboBox的时候,为什么 selectedInd Exchanged事件没有被触发?
5.4. Show和ShowDialog有什么不同?
5.5. 为什么我不能建立右键菜单分离器?(separator)
5.6. 运行时把ImageList赋给ToolBar时,为什么图象不出现?
5.7. 怎样把光标设置成等待状态?
5.8. 如何在菜单项中显示符号:&?
5.9. 如何制作基于.net精简框架的动画控件?
5.10. 如何在.net精简框架上制作自定义控件?
5.11. 如何制作基于.net精简框架的带图片的按钮?
5.12. 如何使用.net精简框架下的MessageWindow类库?
5.13. 如何向DataGrid中添加行和列?
5.14. 如何实现DataGrid的编辑?
5.15. 怎样设置DataGrid的Data source
5.16. 怎样对DataGrid的列排序?
5.17. 怎样对ListView中的内容排序?
5.18. 如何使用 输入板(SIP)控件?
5.19. 如何自定义事件?
5.20. 如何做一个 owner-drawn List Box?
5.21. 如何做一个多选框判断真假?
5.22. 设置InputPanel.Enabled = true的时候为什么出现异常?
5.23. 为什么自定义控件不会自动继承父类的字体?
5.24. 为什么当输入字符时,NumericUpDown 和 domainUpDown 控件不会引发 ValueChanged 和 SelectedItemChanged 事件?
5.25. 为什么NumericUpDown控件增长的值不是设置好的值?
5.26. 为什么Stat usbar不能放在窗体的任意位置?一定要在底部?
5.27. 为什么我的控件自动继承了父控件的背景色?
5.28. 为什么NumericUpDown控件能接受decimal类型的值,但不会显示大于2^16的值?
5.29. 为什么不能在DomainUpDown 中输入文字,而要选择?
5.30. 为什么OpenFileDialog被限制在"My Documents" 文件夹中?
5.31. How can I activate the S ip (InputPanel) without a menu?
5.32. How do I add a subnode to every node in a TreeView?
5.33. How do I determine the number of rows or columns in a DataGrid?
5.34. How do I create a owner drawn Listbox?
5.35. How can I implement Control.GetNextControl under the .NET Compact Framework?
5.36. How do I get notified when the user clicks on a treeview node?
5.37. How do I set the title of a fullscreen multiline edit control window?
5.38. Why don' I see the validItem selected when I set ComboBox.SelectedValue to validItemInCollection?
5.39. How do I detect the location where a 'tap & hold' occurred to bring up a context menu on my custom control?
5.40. Why doesn't the scrollbar value ever get set to the maximum value?
5.41. How do I tab out of a custom control to the previous control?
5.42. How do I add Toolbar buttons with Transparency? 
6. 与本地代码(Native Code)协同工作
6.1. 如何调用本地写的DLL中的 函数
6.2. 如何使用dumpbin.exe帮助描述 P/Invokes?
6.3. 如何为微软.net精简框架写非托管代码?
6.4. 如何调用 P/Invoke GetTickCount?
6.5. 如何获得系统还有多少可用内存?
6.6. 如何是窗口一直保持最小化?
6.7. 在微软.net精简框架上调用系统函数时,如何装配数据类型?
6.8. 如何得到一个窗体或控件的句柄 (HWND) ?
6.9. 如何使用 性能计数器功能?
6.10. 调用本地代码时,数据类型有什么限制?What are the limitations on marshalling types via P/Invoke?
6.11. 调用GetLastError时,总是获得不定的代码?
6.12. 调用本地代码时,有没有参数数量的限制?
6.13. 调用本地代码时,为什么得到"NotSupportedException"异常?
6.14. 如何把 byte[] 转换成 IntPtr?
6.15. Why do I get a MissingMethodException when I call a function from a native DLL?
6.16. How do I set the system time?
6.17. How do I programmatically soft reset the device?
6.18. How can I put an icon on the title bar regardless of the which form is active?
6.19. How do I disable and capture hardware buttons?
6.20. How do I hide the start icon?
6.21. How do I enumerate, create, and terminate processes?
6.22. Where can I find a centralized library of P/Invoke samples?
6.23. How do I play and record .WAV audio files with the Waveform Audio Inteface? 
7. 通用
7.1. 如何确定应用程序的主目录?
7.2. 如何计算精确的时间间隔?
7.3. 如何把嵌入式资源当作一个流(Stream)?
7.4. 为什么得到一个"An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll"的错误?
7.5. 如何使用性能监视器?
7.6. 如何取消一个程序的关闭?
7.7. 如何在我的程序中调用另一个应用程序?
7.8. .net精简框架的应用程序会建立什么线程?
7.9. 如何把byte数组转换成结构体?
7.10. 我可以建立一个委托(delegate)交给Invoke吗?
7.11. 如何在微软.net精简框架上使用电话API?
7.12. 如何在Pocket Pc上生成GUID?
7.13. 如何让我的.net精简框架程序和Pocket Outlook的数据结合?
7.14. 我可以判断.net精简框架中一个文件的版本吗?
7.15. 微软.net精简框架的后台处理有什么相关技术?
7.16. 在微软.net精简框架上使用多线程有什么技巧?
7.17. 如何在 智能设备应用 中使用混淆器?
7.18. 如何使用密码服务对数据进行 加密解密
7.19. 如何在微软.net精简框架上获得Windows CE设备的唯一号码?
7.20. 如何在微软.net精简框架的应用程序上发送短消息?
7.21. 不使用Control.Name,可以判断事件的发送者吗?
7.22. 如何在线程中调用方法的参数?
7.23. 如何建立提醒程序和定时程序?
7.24. 如何 播放 声音
7.25. 如何使用命令行参数?
7.26. 当使用已经释放的对象的方法或属性的时候,为什么得到一个异常?
7.27. 如何获得"Enter", "TAB", 和 "Arrow"按键的事件?
7.28. 如何删除一个只读文件?
7.29. How do I determine if a member exists at runtime?
7.30. How do I determine the device name programatically?
7.31. How do I build a C# Smart Device project from the command line?
7.32. How do I abort an executing thread?
7.33. Why can't I play a mov ie on the Pocket PC emulator?
7.34. How do I suppress Form titles from showing in the active applications list?
7.35. How do I access a Control from its instance name?
7.36. How do I detect the hardware directional pad buttons?
7.37. How do I get a double click event when only the Click event is supported?
7.38. How do I get onenter/onleave style notifications?
7.39. How do I use threading in a modal dialog that doesn't hang my app?
7.40. How do I round floating point numbers efficiently?
7.41. Why does Control.Invoke take so long when a modal dialog is displayed?
7.42. Is there a way to retrieve the culture information of an Assembly?
8. 通讯和Web服务
8.1. 如何通过TCP Socket向桌面机发送数据?
8.2. 为什么不能访问本机上的Web服务?
8.3. 如何在微软.net精简框架上调用Web服务
8.4. 如何通过 代理 服务器提交HTTP GET申请?
8.5. 如何使用Web服务?
8.6. 如何使用MapPoint3.0得到地图?
8.7. 如何使用MapPoint3.0获得地图和方向?
8.8. Is NTLM authentication supported by the .NET Compact Framework?
8.9. When using blocking Sockets, why does Send throw an InvalidOperationException when blocking is set to false?
8.10. How do I create an http-server?
8.11. Why do I get an exception when calling SetSocketOption with ReuseAddress set?
8.12. Why do I get a socket error using SSL to communicate with a server via the WebRequest namespace?
9. SQL CE 和 数据
9.1. 使用.net精简框架、 SQL SERVER CE 和 复制 开发应用程序时,要注意些什么?
9.2. 如何在微软.net精简框架上使用合并复制(Merge Replication)?
9.3. 如何将 ado.net数据和XML绑定?
9.4. 如何建立SQL Server CE的 数据库
9.5. 如何向SQL Server CE提交一个带参数的查询?
9.6. Why does using RDA and the push method fail with error 27750?
10. 其他信息
10.1. Pocket TaskVision 程序
10.2. 建立基于微软.net精简框架的进程管理器
10.3. 使用微软.net精简框架开发移动游戏
10.4. 制作一个微软.net精简框架的DateTimePicker控件
10.5. 写一个捕捉Pocket PC签名的程序
10.6. 有没有非微软的网站提供在.net精简框架上开发应用的信息?
11. 连通性
11.1. 为什么不同通过ActiveSync把程序部署到Windows CE的设备上?
11.2. 为什么不能通过ActiveSync调试 CEPC 或其他 x86 的Windows CE设备?
11.3. 为什么当设备上的Toolhelp.dll文件丢失后,调试就会失败?
11.4. 为什么当网络协议数超过50个的时候,就不能向设备发布程序?
11.5. 为什么卸载ActiveSync后,不能通过ActiveSync向设备发布?
11.6. 为什么本地化的机器名或用户名或导致向设备发布程序的失败?
11.7. 为什么当前用户不属于Administrators组的时候,不能向设备发布程序?
11.8. 为什么向Pocket PC或模拟器发布的时候出现 sharing violation 的错误?
11.9. 为什么在.NET Server的 计算机上第一次使用模拟器的时候,得到一个 安全警告消息?
11.10. 为什么在模拟器刚开始运行的时候出现关于找不到文件的错误信息?
11.11. 为什么第一次用模拟器发布时,会出现偶尔的错误?
11.12. 为什么第一次用Connect按钮连接模拟器并发布程序的时候失败了?
11.13. 为什么当计算机没有网络连接的时候,用模拟器调试程序会出现错误?
11.14. 为什么当模拟器使用了一个COM端口的时候不启动不了(黑屏)?
11.15. 为什么Visual Studio .NET 2003的模拟器不能和eMbedded Visual Tools的模拟器同时使用?
11.16. 为什么没有ActiveSync连接的时候不能通过TCP连接向设备发布程序?
11.17. How can I allow Activesync to connect to an Emulator session from Visual Studio .NET 2003?
11.18. How can I copy files to the device currently connected to desktop ActiveSync?
11.19. Why does the Visual Studio debugger fail to connect to an ARMV4I device?
12. Smartphone
12.1. Where can I get the latest Smartphone SDK?
12.2. What are the rules for Smartphone menus?
12.3. Why are there disabled controls in the toolbox when creating a Smartphone project?
12.4. Does Smartphone support RAM installs of the .NET Compact Framework?
12.5. How do I set the title of a fullscreen multiline edit control window?
12.6. How can I generate Smartphone CABWizSP XML docs from existing Pocket PC CAB files?
12.7. How can I send characters and strings to the Smartphone 2003 Emulator via ActiveSync?
12.8. How do I programmatically set the Smartphone input mode?
Top of Page Top of Page


1. 开发

1.1. 什么是微软 .net精简框架?

微软.net精简框架是.net框架为智能设备开发的平台,是实现微软的目标:“为用户提供精彩的体验--任何时间、任何地点、任何设备” 的关键部分。.net精简框架把托管代码的世界从web服务带到了智能设备上, 允许在个人数字助理(PDA)、移动电话、机顶盒设备上的 安全的、可下载的应用。

ASPx">http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/overview/default.aspx

1.2. 我需要什么工具才能开发.net精简框架的应用?

Visual Studio .NET 2003 是在Pocket PC 2000、Pocket PC 2002和Windows CE.NET 4.1上开发.net精简框架所需要的, .net精简框架与Visual Studio .NET 2003一同发售.
http://msdn.microsoft.com/mobility/prodtechinfo/devtools/vstudio/default.aspx

其他Windows移动平台开发包可以在以下地方获得:

Windows Mobile 2003 Pocket PC SDK:
DOWNLOADs/details.aspx?familyid=9996b314-0364-4623-9ede-0b5fbb133652&displaylang=en" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?familyid=9996b314-0364-4623-9ede-0b5fbb133652&displaylang=en

Windows Mobile 2003 Smartphone SDK:
http://www.microsoft.com/downloads/details.aspx?familyid=a6c4f799-ec5c-427c-807c-4c0f96765a81&displaylang=en

这篇文章将介绍如何使用.net精简框架和Visual Studio .NET 2003下开发健壮的智能设备应用程序.
http://msdn.microsoft.com/library/en-us/dnnetcomp/html/netcfgetstarted.asp

1.3. 哪里可以下载最新的工具和相关软件?

Visual Studio .NET 2003试用版可以在这里获得:
http://msdn.microsoft.com/vstudio/productinfo/trial/default.aspx

最新的.net精简框架和补丁集可以在这里获得:
http://msdn.microsoft.com/mobility/downloads/default.aspx

1.4. .net精简框架支持些什么设备?

.net精简框架可以在Pocket PC 2000, Pocket PC 2002, Windows Mobile 2003的Pocket PC 和 基于Windows CE.NET 4.1嵌入式系统的Pocket PC、智能手机 上运行。

1.5. .net精简框架以后将支持什么设备?

.net精简框架将被集成到微软系统中并成为一部分,包括未来的Pocket PC设备,Pocket PC电话版,智能手机,车载Windows CE系统,MSTV。 各种设备的发布时间待定。

.net精简框架将作为Windows CE .NET 4.1系统组件的一部分,因此允许OEM厂商使用PlatformBuilder把.net精简框架集成到新的Windows CE设备中。

1.6. 调试程序时为什么会出现“与模拟器建立连接失败”的错误(刚开始执行程序的时候)?

下面这个连接将告诉你如何设置调试和排错。
dbff573-73fb-4f9f-a464-c5adc890e1ae/Readme.htm" rel="nofollow">http://download.microsoft.com/download/c/d/b/cdbff573-73fb-4f9f-a464-c5adc890e1ae/Readme.htm

1.7. .net框架和.net精简框架之间有什么区别?

.NET框架 和 .net精简框架 的关系:
http://msdn.microsoft.com/library/en-us/dv_evtuv/html/etconComparisonsWithNETFramework.asp

在线查看.net精简框架类库关系工具:
http://msdn.microsoft.com/library/en-us/dv_spchk/html/NET_Compact_Framework.htm

1.8. .net精简框架的补丁有什么改进?

.net精简框架 SP1 修正了许多漏洞,查看修正项目列表:
http://www.microsoft.com/downloads/details.aspx?familyid=1f62a2a3-7282-4ba9-b26b-2267e972501d&displaylang=en

1.9. Poclet PC上的.net精简框架开发和Windows CE .NET上的.net精简框架开发有什么不同?

这篇文章将描述在Pocket PC和Windows CE.NET平台上开发基于.net 精简框架的应用程序的区别之处。
http://msdn.microsoft.com/library/en-us/dnnetcomp/html/netcfPPCtoCE.asp

1.10. 哪里有更多的关于建立.net精简框架上的应用程序的信息?

以下资源能教会您怎样建立.net精简框架应用程序:

转载于:http://blog.itpub.net/10790690/viewspace-961327/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值