|
|
|
|
|
|
|
Mobile Ink Jots 3:在 Web 上写写画画6 |
|
|
|
析。 那么,手写支持的情况又怎样呢?由于相同的原因,我们不能直接加载 Windows Forms PictureBox 的实例,我们不能从驻留在客户端的全局程序集缓存中的 Microsoft.Ink 程序集直接将一个 InkPicture 或 InkEdit 控件实例化。我们必须派生自己的控件,这样做很好,因为实际上,无论如何我们都不希望将自己限于 InkPicture 和 InkEdit。通常,我们当然希望编写自己的用户界面控件,附加 InkCollector 或 InkOverlay 对象,并完全按照我们希望的方式在我们希望的地方执行识别。 下列的示例代码演示了一个简单但完整的、由 UserControl 派生的 Windows Forms 类,它带有一个附加的 InkCollector 对象。 namespace MyControls { public class InkableUserControl : System.Windows.Forms.UserControl { private Microsoft.Ink.InkCollector inkCollector; public InkableUserControl() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // Further initialization this.BackColor = Color.FromKnownColor(KnownColor.Window); this.i页码:[1] [2] [3] [4] [5] [6] [7] 第6页、共7页 |
|
|
|
|
设为首页 | 加入收藏 | 广告服务 | 友情链接 | 版权申明
Copyriht 2007 - 2008 © 科普之友 All right reserved |