CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

Tablet PC : What can and what cannot be overlaid with an InkOverlay object

Part of the tablet PC API is the Inkoverlay class. The constructor takes a control or even a windows handle. The user can scrible on the associated window. You can pass almost any handle to the constructor, like the handle of an ActiveX control on your Winform. This snippet makes the calender ActiveX a pen target:

private InkOverlay io;

io = new InkOverlay(axCalendar1.Handle);
io.AttachMode = InkOverlayAttachMode.InFront;
io.Enabled = true;

Now the user can scrible over the calender ActiveX control.

The control itself can no longer be clicked as it is shielded off by the ink-overlay.

There is one limitation to the handles accepted, they have to be owned by the same process. Passing a handle to (the mainform of) another application will result in an exception. Which is a pitty, else making a general annotation app for a tablet would have been very easy. It would be a matter of covering the app with an Inkoverlay object.

Peter


Published Dec 14 2004, 11:59 AM by pvanooijen
Filed under:

Comments

TrackBack said:

# February 18, 2005 12:47 PM

Peter's Gekko said:

I’m a big fan of the tablet PC and have a category tablet PC on my blog. But havn’t blogged that much...
# May 9, 2005 3:23 AM

Peter's Gekko said:

Having spent 3 solid days on doing a crash-course VS 2005 training it's time for a little diversion....
# June 16, 2005 5:09 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!