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.


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;