Using Tablet PC Ink on Windows Controls


You can use any control as a surface for the ink and can write on these controls using a Tablet PC pen. To make a control ink enabled, you must have to assign the handle of the control to InkOverlay handle.

For example, the following code sets a button as ink overlay control. So you can write on the button using Tablet PC pen.

InkOverlay inkOverlay = new InkOverlay();
inkOverlay.Handle= button1.Handle;
inkOverlay.Enabled = true;

 

Using the above code, only one control can be used at a time. For example, if we replace the above code with the following, only DataGrid control will support the ink overlay.

InkOverlay inkOverlay = new InkOverlay();
inkOverlay.Handle= button1.Handle;
inkOverlay.Handle= dataGrid1.Handle;
inkOverlay.Enabled = true;

If you want to make the Form as default drawing surface, you can assign Form's handle to the InkOverlay's handle using the following code:

inkOverlay.Handle= form1.Handle;


Similar Articles
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.