Wednesday, February 13, 2008

Dell started selling their own TabletPC recently. Since it looks comparable to my Lenovo Thinkpad, I took a closer look the specs and compared them. And the results are....[read more]

[A New DevLife Post]

Wednesday, February 13, 2008 9:36:24 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, January 31, 2008

In the TabletPC SDKs and in WPF it's very easy to take an ink image and save it to an image format - BMP, JPG, etc.

Then came Silverlight and the InkPresenter and naturally I wanted to do the same. But it wasn't so easy.

Silverlight itself isn't bogged down with that functionality. So you first need to get the XAML representation of the Ink and send it to a service where either the TabletPC SDK or the WPF APIs are available. Even then you are not home free because the Silverlight ink is not quite the same as either of the other two. So you then need to extract data from the XAML representation of the Silverlight ink and create a new object for whichever API you choose.

This was all done in Silverlight 1.0. I haven't pulled this into Silverlight 1.1/2.0 yet, but it should all be the same and you still have to do the conversion on the server side. THe only difference of course, is the javascript needs to be converted to .NET code on the client side.

Even then, there is still some more trickery because there is something strange with using the width from the Silverlight object and I spent hours just experimenting with getting the proportions to display properly in the image. I also spent a lot of time struggling with the colors because the javascript output of the color values doesn't line up with what WPF wants. You'll see in the code comments all of the conversions going on.

Once I had all of that worked out (and this represents hours of effort) there were still some issues. Luckily, Stefan Wick, who is the ultimate guru on this topic and finally has a blog - hoorah!, was able to set me straight (and trim some  of my code down significantly).

I hadn't thought much of this nor, apparently had anyone else, until someone recently emailed asking me how I did it so that he can use it as part of a solution in a competition. (I hope that the requirements of the competition don't say anything about original work!), so I thought I would blog the steps.

1) Convert the InkPresenter data to XAML . This does two things. FIrst it enables you to serialize it and pass it to a web service and secondly, it is the lowest reasonable common denominator for sharing between different objects. This javascript code comes from Gavin Gear.

This javascript code reads through the StrokeCollection property of an InkPresenter and builds up a string of xml that is the XAML representation of the StrokeCollection. You could also take the resulting string and pass it to CreateFromXAML to recreate the Silverlight StrokeCollection object.

  if (strokeCollection.Count>0)
  { 
   var xaml = "<StrokeCollection>";
   if (strokeCollection != null)
   {
    for (var i = 0; i < strokeCollection.Count; i++)
    {
        var stroke = strokeCollection.GetItem(i);
        if (stroke.Name>"")
          xaml += "<Stroke Name='" + stroke.Name + "'><Stroke.DrawingAttributes>";
        else
          xaml += "<Stroke><Stroke.DrawingAttributes>";
        xaml += "<DrawingAttributes ";
        xaml += "Color='" + BrowserColorConverter(stroke.DrawingAttributes.Color) + "' ";
        xaml += "OutlineColor='" + convertColorToHexString(stroke.DrawingAttributes.OutlineColor) + "' ";
        xaml += "Width='" + stroke.DrawingAttributes.Width + "' ";
        xaml += "Height='" + stroke.DrawingAttributes.Height + "' ";
        xaml += "/></Stroke.DrawingAttributes>";
        xaml += "<Stroke.StylusPoints>";
        for (var j = 0; j < stroke.StylusPoints.Count; j++)
        {
            var stylusPoint = stroke.StylusPoints.GetItem(j);
            xaml += "<StylusPoint X='" + roundToTwoDecimalPlaces(stylusPoint.X) + "' Y='" +
roundToTwoDecimalPlaces(stylusPoint.Y) + "' />"; } xaml += "</Stroke.StylusPoints></Stroke>"; } } xaml += "</StrokeCollection>";

 

2) Pass this string to a web service method that will do the following to it

3) Create a WPF InkObject from the XAML. Now that I'm in the web service, I can use .NET code. Phew. Note that I did this before I knew how to use LINQ to XML so I struggled through XPath to get this. Watch for an upcoming MSDN Mag article that will have updated code.

      private static StrokeCollection InkObjectfromXAML(XmlNode StrokeColl)
      {
          StrokeCollection objStrokes = new StrokeCollection();
          XmlNodeList strokeElements =
          StrokeColl.SelectNodes("Stroke");
          foreach (XmlNode strokeNodeElement in strokeElements)
          { 

              //step 1: create a new stroke from the stylus point elements in the XAML
              XmlNodeList stylusPointElements =
                  strokeNodeElement.SelectNodes("./Stroke.StylusPoints/StylusPoint");
              XmlNode drawAttribs = strokeNodeElement.SelectSingleNode("./Stroke.DrawingAttributes");
              //points node is sent to GetStrokePOints method to convert to a type 
//that can be used by the new stroke
System.Windows.Input.StylusPointCollection strokeData = GetStrokePoints(stylusPointElements); Stroke newstroke = new Stroke(strokeData); //step 2: grab color metadata about stroke from the xaml //color is a hex value //the stroke object requires a System.Windows.Media.Color type //following code performs the conversion string mycolor = drawAttribs.FirstChild.Attributes["Color"].Value; System.Drawing.Color drwColor = System.Drawing.ColorTranslator.FromHtml(mycolor); //build the new color from the a,r,g,b values of the drawing.color System.Windows.Media.Color newColor = new System.Windows.Media.Color(); newColor.A = drwColor.A; newColor.R = drwColor.R; newColor.G = drwColor.G; newColor.B = drwColor.B; //Step 3: extract width data from xaml, convert to int int myIntWidth; bool parseSuccess = int.TryParse(drawAttribs.FirstChild.Attributes["Width"].Value,
out myIntWidth); //Step 4: apply width & color to stroke //some really wierd unexplainable transformations that I had to get
              // around until the final images looked right.
if (myIntWidth == 3) newstroke.DrawingAttributes.Width = 1.5; else newstroke.DrawingAttributes.Width = 2; newstroke.DrawingAttributes.Color = newColor; //Step 5: add stroke to the stroke collection objStrokes.Add(newstroke); } return objStrokes; }
    //This method (called from the method above, is an abstraciton of some sample code from Microsoft
     private static System.Windows.Input.StylusPointCollection GetStrokePoints(XmlNodeList stylusPointElements)
        {
System.Windows.Input.StylusPointCollection pointData = new System.Windows.Input.StylusPointCollection();

            //The object requires HiMetric point values, create multiplier for conversion
            double pixelToHimetricMultiplier = (2540d / 96d) / 100;

            foreach (XmlNode stylusPointElement in stylusPointElements)
            {
                string xStr = stylusPointElement.Attributes["X"].Value;
                string yStr = stylusPointElement.Attributes["Y"].Value;

                //x and y are in pixels, we need to multiply them to get them into HIMETRIC
                //space, which is what the InkAnalyzerBase expects
                int xInHimetric = (int)(System.Convert.ToDouble(xStr) * pixelToHimetricMultiplier);
                int yInHimetric = (int)(System.Convert.ToDouble(yStr) * pixelToHimetricMultiplier);
                pointData.Add(new System.Windows.Input.StylusPoint(xInHimetric, yInHimetric));
            }

            return pointData;
        }
Now we have an inkObject that WPF will be happy with!

4) Convert WPF Ink to PNG format bytes This is with a BIG thanks to Stefan - we need to start a separate thread to do the conversion from WPF Ink ojbect to PNG. That conversion happens inside the thread. Also, thank to his deep understanding of the ink object, Stefan was able to accomplish in a much smaller amount of code what I had achieved in about 3 times as much code. I was definitely doing loop-dee-loops, but it was the best I could come up at the time.

Note that I am not saving to an actual file here, just creating the bytes because my goal was to store that in a database.

   private static void ThreadforConverttoPNG()
   {
    Thread t = new Thread(new ThreadStart(ConverttoPNG));
    t.SetApartmentState(ApartmentState.STA);  

    // Start ThreadProc.  Note that on a uniprocessor, the new 
    // thread does not get any processor time until the main thread 
    // is preempted or yields.  Uncomment the Thread.Sleep that 
    // follows t.Start() to see the difference.
    t.Start();
   }
   private static void ConverttoPNG()
   {
    //I had originally achieved this with a LOT more code. This is Stefan's more trimmed down method

    //create temporary InkCanvas
    InkCanvas inkCanvas = new InkCanvas();
    inkCanvas.Strokes = strokes;
    //render InkCanvas to a RenderBitmapTarget
    Rect rect = inkCanvas.Strokes.GetBounds();
    RenderTargetBitmap rtb = new RenderTargetBitmap((int)rect.Right, 
(int)rect.Bottom, 96d, 96d, System.Windows.Media.PixelFormats.Default); rtb.Render(inkCanvas); //endcode as PNG BitmapEncoder pngEncoder = new PngBitmapEncoder(); pngEncoder.Frames.Add(BitmapFrame.Create(rtb)); //save to memory stream System.IO.MemoryStream ms = new System.IO.MemoryStream(); pngEncoder.Save(ms); ms.Close(); strokeBytes= ms.ToArray();    }

5) My next step was actually to store the bytes into a database. I wasn't actually saving out to a file. But to do that is simple. System.IO.File lets you create a new file on the fly from a byte array.

   System.IO.File.WriteAllBytes("C:\\myfile.png",strokeBytes); 

So, those are all of the pieces from converting a silverlight inkpresenter image to an image file.

Thursday, January 31, 2008 10:06:29 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, October 28, 2007

Yet another Flash driven advertisement (here are some others i've blogged about in the past) that uses annotation. Below is a screencast of me playing with this Notes ad (with a mouse, not a stylus). You can do this in Silverlight 1.0 and 1.1 with the InkPresenter. I'll be giving a session on Annotating in Silverlight as part of the Mobile Connections show during the big DevConnections conference next week (Nov 5 - 8) in Las Vegas.

Sunday, October 28, 2007 3:11:28 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, October 26, 2007

I came across an article about drawings being used rather than passwords for security on computers, etc. Read more here...

[A New DevLife Post]

Friday, October 26, 2007 1:06:08 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, September 16, 2007

Loren Heiny has been working on a cool Silverlight annotation app to user Silverlight and a stylus to do Google and Technorati searches. It's called SearchTip and is live on TabletPC Post.

There is a lot that is really interesting about this. (And it's visually appealing too!) First of all, he has a YouTube video where he compares using this (earlier version) on a Mac to using Inkwell on the Mac (when you have a tablet ala Wacom attached to the Mac) and demonstrates the superiority of Microsoft's handwriting recognition. I was lucky enough to attend an SDR at Microsoft a few years ago where the man who ran the whole reco team explained to us how they made it all work. I can't imagine anybody being able to come close to their investment or acheivement with handwriting recognition, so it was great to see Loren being able to really compare apples to apples (no pun originally intended, but oh well!)

Next is the fact that Loren is doing handwriting recognition from the InkPresenter in Silverlight. Not an easy feat. Once the reco is done, the result can get passed to a google service and voila you get your results displayed.

Loren has done some amazing work with the Tablet APIs for a number of years and always thinks out of the box. So I love that he's taking his ideas and applying them to Silverlight.

 

Of course, you don't need a tabletpc to draw in silverlight, but as awesome as the recognition is, I don't think it's fair to ask it to recognize mouse drawn handwriting. But it's not bad. Reco returns a list of guesses, sorted by best to worst. Here I'm using an earlier version which does google searching and trying it with my mouse on a regular (non-tablet) desktop.

So you can click on the guess (I clicked on Steins) and it will show you the next guess on it's list. Heinz was next, then a few more clicks (just to see) got me off the track. oops. This is not a reflection of the reco or of Loren's app. I'm only playing around with the mouse for fun (and laziness since my tablet is upstairs.) So while the reco may not be great when you aren't using a stylus which has about 10 times the resolution as a mouse, Silverlight's ability to collect the ink data from the mouse is still pretty impressive.

You can see Loren doing this. and how impressive it truly is using a Tablet, in his YouTube demo video.

You can clear your writing with the x, and of course, when you have the correct reco displayed, click Search.

Sunday, September 16, 2007 9:48:13 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Friday, June 29, 2007

Last year, there was lots of buzz about a possible iTablet, for example, ZDNet's Matthew Miller is piecing together some various things he'd been reading. I never really paid much attention to it but now the iPhone has been making me wonder  if the technology that has gone into the iPhone is headed for other things (and if I was paying more attention , that's probably been said in a thousand blogs, too). Certainly if you google "tablet pc" and apple there's gobs of speculation - mostly from last year because a patent had been filed at some point. The patent most likely was for the technology in the iPhone. But heck, I have a touch screen tablet pc (Lenovo Thinkpad X60) and yet I'm still drooling over the iPhone (no AT&T in Vermont and I want Mobile 6 anyway and someone also pointed out on a listserv today... that phone's now cost more than computers!).

I don't know how Apple would ever come close to what Microsoft has done with the Tablet PC platform though, especially with the hand writing recognition. If I recall correctly, there were over a million samples used to get the recognition algorithms. On my touch screen, I can actually write with my finger (just for fun, and it was Stephen Toub who gave me that idea) and the reco works with that even!

Of course there's always Surface which is just as droolyas an iPhone  - just can't put it in your pocket.

Friday, June 29, 2007 8:17:58 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Thursday, June 21, 2007

The Mobile team is at it again. They have written a converter to take Journal notes and convert them into an interactive Silverlight page. You can read about it on the Mobile dev center and download the converter application. There are two live demos of it here on my own website where I have hosted their sample and one of my own. (Click on the images below to go to the samples.) Note that mine seems to have stretched a bit because I created it on a lower resolution computer.

Thursday, June 21, 2007 8:45:56 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Thursday, June 14, 2007

I keep seeing all of these flash ads that have a pen that you can move around with your mouse and draw - similar to all of the inky stuff I've been doing except I wanted that pen, too! I finally figured out how to pull it off. Read more here...

[A New DevLife Post]

Thursday, June 14, 2007 11:39:28 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, June 04, 2007

Inspired by the Scribbler app (part of the Silverlight 1.1 Gallery), written by Daniel Cook  & Pete Blois (with some inspiration from Laurence Moroney)  I decided to spiff up my own drawing application.

Why is it that a black background seems to be the way to make apps look cool?

I even finally opened up Microsoft Expression Blend to help me since I was getting sick of working in raw XAML and having to test each visual change by debugging the app. Last time I looked at this product, it frightened me and I closed it quickly. But now that I have done enough of the hand-coded XAML, it was not a huge leap to comprehend how to use Expression Blend and what I could do with it.

One thing that I discovered is that the Background property of the InkPresenter element, while necessary, is not recognized by the designer. So to do the design in Expression, I had to remove that property, then replace it when I wanted to test out the app.

Since my app is still using the v1.0 of Silverlight (and javascript, not .NET), I can't pull off the slick color picker that is in the Scribbler app. But when it's time to move to v1.1, I'll know where to find the code!

Monday, June 04, 2007 11:25:53 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, June 02, 2007

The battery on my 3 month old Lenovo X60 is dead and I am getting the dreaded notice in the power manager "Irreparable damage to the battery has been detected. Replace the battery with the new one."

In addition to the message in the Power manager, I have the following symptoms:

  • Battery Indicator light is blinking orange
  • Power status says "Plugged in, not charging"
  • Computer shuts down immediately when unplugged (since the battery is dead).

This is not atypical of old batteries that need replacement, but this battery is fairly new and has not been abused in any way.

I attempted a recommended BIOS update but this requires a fully charged battery.

I checked the March 27th battery recall, but my battery was not on the list.

Luckily, I found a comment thread in the LenovoBlogs under a post that is a few months old called "Power Manager." There is a new string of comments that began a few days ago with other people having this problem. An IBM technician from Vancouver has joined the thread, identifed the problem and is currently seeking a solution.

So if you have found my blog post via searching for a solution to this problem... keep an eye on the comments on the tail end of this post's comments: http://www.lenovoblogs.com/insidethebox/?p=52.

I like having found the www.LenovoBlogs.com site. It's a mini "blogs.msdn.com" and a good stab at corporate transparency and accessibility. The product manager's direct phone number is even published there!

Saturday, June 02, 2007 9:18:14 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, June 01, 2007

There are a few silverlight demos that use the InkPresenter, though two of them don't refer to Ink at all...:

The page turning demo has it. You can annotate the pages and that gets remembered during your session. As you flip the pages back and forth, the annotations are incorporated into the effects.

The scribbler demo has it. This is straight drawing. What I love here is the cool pallette.

The Ink Tattoo Studio demo has it. This a fun demo.  On a tabletpc, the pressure of the stylus can be registered by the digitizer.I saw a version of this app that said "Ouch!" if the pressure got too high. Otherwise, the tattoo tool buzzes.

 

Friday, June 01, 2007 8:48:51 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, May 10, 2007

I've been heads down since MIX07 playing with the new ink object in silverlight. I have posted a sample with my tests and some of the code. Read more here.

[A New DevLife Post]

Thursday, May 10, 2007 10:31:02 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, May 01, 2007

Silverlight does INK! Yay. I've been asking about it for a while thinking it was the next natural step. I actually have played with it a bit and have a little app that I wrote that I need to deploy with the GoLive license. This is with the 1.0 version of Silverlight so it is all javascript against the InkPresenter XAML object. This also means that it is very different than coding against the Tablet PC API. However with the .NET runtime support for Silverlight that will change.

The InkPresenter has a StrokeCollection, just like we are familiar with in the Ink API. And then you drill into each individual stroke and even stylus points. With the stylus point data not only can you redisplay the ink in XAML, but you can redraw it and you can do so in real time (eg at the same speed that it was originally drawn in.

The way you interact with the user drawing ink via the javascript is by responding to mousedown, mousemove and mouseup events. Billy Hollis recognized this as how he worked with ink before we had the Ink APIs. It's a little frustrating to have to work at this low level but it's very interesting and i have a lot of flexibility. However, I do look forward to the .NET runtime implementation!

As always, my key interest is in persisting the ink. This can be done in XAML (you have to iterate through the ink structure and create the XAML, a function which can be encapsulated of course) and the CreateFromXAML javascript function will deserialize the XAML back into the inkdata that can be fed into the InkPresenter.

This is a pretty high level description and I'll explain more of the guts of what I have done in a later post as well as have a screencast available while I deal with getting the golive version on the web.

In the meantime, check out Gavin Gear's blog - he is a Program Manager on the tablet team and has done some amazing work with ink in Silverlight. Along with Sam George, he gets to show off a very cool demo tomorrow that they wrote. There are some live examples in the Silverlight gallery as well.

From Gavin's blog

Want to check out a Silverlight Ink sample? Check out “Ink Tattoo Studio” and “Page Turn” here:
http://silverlight.net/community/communitygallery.aspx

Also, I know that Loren Heiny , who has always been a great innovator with tablet pc development, is playing with this stuff too. So keep an eye on his blog as well.

Tuesday, May 01, 2007 12:30:09 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, April 23, 2007

I have had my new Lenovo ThinkPad X60 for over a month now and the Touch Screen is my favorite. Read more (and also a bonus tale (confession?) about me absentmindedly leaving my laptop behind (open and running) at the Sofia, Bulgaria airport - oops)

[A New DevLife Post]

Monday, April 23, 2007 9:15:45 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, April 22, 2007

Once I got writing, I guess I couldn't stop.

First there was the just published INKED! in aspnetPRO earlier this month.

Now I have the latest CoDe Focus Mobile PC Development (special focus issue published by CoDe Magazine) where along with a lot of cool articles on WPF and Ink (thanks Billy, it was my first foray into WPF-finally), Ink Analysis and more, is my article on Inking in ASP.NET 2.0, AJAX and IE7.

There's one more coming for MSDN Online on the Mobile Dev Center. It's just in final edits right now.

Sunday, April 22, 2007 7:17:05 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, April 17, 2007

Tablet PC/Ink related sessions & HOLs I see on the MIX site:

SESSION:
Ink for Designers and Developers
Speaker(s): Sam Geroge - Microsoft
Audience(s): Designer, Developer
Imagine if your users could add handwritten annotations over online photos, greeting cards or video (including live playback of your handwriting). Learn how to use Ink to take your Web sites to new heights of interactivity, personalization, social interaction, and usability. Learn the key design principles for Ink, and see how to code for Ink in the browser and on the server.

HANDS ON LAB:
Ink in Web Applications
Audience(s): Business Decision Maker, Designer, Developer
Adding ink and annotations makes your Web applications far more interactive and enables users to add their own personal touch. This lab shows just how easy it is to add ink and annotation, which integrate seamlessly with other features of Web development. You will become familiar with a Web page for browsing photos; implement ink support; change the thickness and color of the ink; implement erasing with the back of the pen, and more.

(I think there are more HOLs. I just don't see them on the site yet)

Tuesday, April 17, 2007 10:04:11 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, April 03, 2007

My latest asp.netPRO article is about ink-enabling web sites and is aimed at web developers who are new to the ink APIs for TabletPC development.

I LOVE the cover they did for this issue. Coooooool, huh?

Tuesday, April 03, 2007 7:01:00 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Thursday, March 22, 2007

Think Mobile apps are cool? Wanna win a UMPC (now that's cool, too!)

From the mobility folks:

Today’s apps must work in an increasingly mobile environment and must allow new means of input: ink, touch, and more. Build a great application that encompasses these needs, write an article about what you’ve done, and you may win one of three cool Samsung Ultra-Mobile PCs. One winner per month, 3/15/07–6/15/07.
Check out Code Project for more details.

Hmm, now that I've got my own TOUCH SCREEN tablet, all I need to do is find some free time, and I'm so there....

Thursday, March 22, 2007 3:20:38 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, January 21, 2007

Here's a picture of a guy from FEMA going door to door in Oklahoma checking on residents who have been out of power from the ice storms. He's carrying a clipboard with lots of papers. Surely what he writes will then get typed into a computer. Wouldn't it make more sense to use a Tablet and do the data entry directly?

The benefit of the clipboard however is it's light weight and it's not dependant on battery life. Yes, it's cheaper, too.

Sunday, January 21, 2007 10:56:28 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Thursday, August 31, 2006

Last night I took one of my demos that I have used in past articles (Persisting Ink on the Web for MSDN online and Ink on the Web for CoDe Mag) and that will be in my session at Mobile Connections in November (Las Vegas) and redid it in a page using Atlas. Anyone attending my session will be the first to lay eyes on it!

It was very sweet. The demo has an ink control on the page and grabs ink data from a database and loads it into the control. It's not rocket science and I'm just saving a full postback, but since then I have been dreaming up a fun new project that I am hoping to find some time to dive into that will make nice use of these combined tools. I'm not sharing that quite yet, but just the fact that ink and atlas go together is pretty groovy.

Thursday, August 31, 2006 10:18:07 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, August 30, 2006

Although many are using the new OnClientClick property to ask "are you sure?" before letting users delete records, I have discovered that it can completely change (for the better, for the way better) how I have been constructing code for handling ink on the web. [read more ...]

[A DevLife post]

Wednesday, August 30, 2006 9:30:08 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, April 27, 2006

This is definitely something that's on my mind a lot. I'm not marketing person and it's not something I've been tasked with by a marketing person or the TabletPC team. It's just something that keeps popping up and is very interesting to me.

This weekend while visiting friends outside of Madison, WI after Deeper in .NET, I learned that my friend's partner, a painting contractor who is extremely non-technical, has a TabletPC. [read more ...]

[A DevLife post]



Don't Forget: www.acehaid.org
Thursday, April 27, 2006 10:40:34 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, April 26, 2006

A reader of my recent Ink on the Web article in CoDe Magazine (samples available here) emailed me with an odd problem that I had to see in action before I realized what was going on.

The problem was this. She had a web form with an ink-enabled winforms control on it that worked fine. But when she added an asp:dropdownlist, the page crashed. She said she got no error message.

I tried the same thing and received a big fat error saying "Control 'dropdownlist1' of type 'dropdownlist' must be placed inside a form tag with runat=server".

Aha! In order to do most of the tricks I am performing with moving the ink control's data from the client side to the server side require the form to not be a server-side form. Therefore "runat=server" does not exist in the form tag.

The solution is to have separate forms on the page for the ink control and the server side controls.

Kirk Allen Evans reminds us that only one server side form can be visible at a time, so you have to design your page around these limitations unfortunately. You don't be able to have server controls in a form, then below that an ink control in another form and then below that more server controls in a third form.

The general html of the page would look like this:

 
<html>
<HEAD> ...some stuff in here </HEAD>
 
<body>
<script> ..some scrpts here </script>
 
<!--this is the form that handes the inkable control. It does NOT have runat=server-->

  <form id="inkForm" name="inkForm" action="Handler.ashx" method="post">

     <object id="ComplexInkControl" classid="InkControls.dll#InkControls.MyInkControl" style="width: 100px;
     height: 100px"
VIEWASTEXT></object>

  </form>
 
<!--this is the form that has server side controls-->

   <form id="serversideFORM" runat=server>

        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
             <asp:ListItem>a</asp:ListItem>
            
<asp:ListItem>b</asp:ListItem>
             <asp:ListItem>c</asp:ListItem>
            
<asp:ListItem>d</asp:ListItem>
         
</asp:DropDownList><br />

         <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />

     </form>

</body>

</html>



Don't Forget: www.acehaid.org
Wednesday, April 26, 2006 7:29:56 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, April 20, 2006

Joel Spolsky's May 2000 article on the Chicken and the Egg Problem seems like a good place to look for solving the adoption problems of the Tablet PC (remember "Mobile PC" now) which is discussed endessly by Tablet PC developer ("make tablets easier to buy so people will buy our software!") and the manufacturers ("make more software so people will want to buy our tablets!"). [read more ...]

[A DevLife post]



Don't Forget: www.acehaid.org
Thursday, April 20, 2006 9:59:26 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, April 16, 2006

It's everywhere it's everywhere! And now it's even on MSDN, too! [read more...]

[A DevLife post]



Don't Forget: www.acehaid.org
Sunday, April 16, 2006 8:23:04 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
Earlier this week I wrote about how I got glass onto my M4 with the 5308 build of Windows Vista.
Yesterday I installed the latest CTP of Vista (5342). [read more...]
 
[A DevLife post]


Don't Forget: www.acehaid.org
Sunday, April 16, 2006 8:21:04 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, April 14, 2006

While I have merely enabled ink in my own controls on my own web pages , Loren Heiny is working n something really cool!! A way to place inkable edit controls over existing text boxes on web pages. For example, in his Camtasia video demonstrating his tests, he opens up Google and can write directly in he google text box, then it will get recognized and converted to text. This is instead of using the TIP.

This is big U.I. problem that many tablet pc developers struggle with. We like the idea of users opening up forms and writing directly in them and having that get recognized. What we lose, though is the editing flexibility of the tip. So the conundrum is how to get these two things to merge!

Loren is using some magic to get his inkable edit boxes placed over the fields, which means that this needs to be predefined somehow for each page. But that doesn't seem worriesome to me. It sounds like his tool might eventually enable anyone to create the definitions for any page and share them. Or the developers of those page could create the placement definitions for their own pages and let end users download them. Something like the how the context tagging works for tablet pcs. Or better yet, anyone could just hire Loren to create the mappings for their pages. :-)

Anyway, check out Loren's post and accompanying video demonstration. Neat stuff!



Don't Forget: www.acehaid.org
Friday, April 14, 2006 2:15:28 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, April 10, 2006

Lori McKinney sent me an email in response to my Winforms hosted in i.e. post, pointing out the I.E. update that  caters to the EOLAS lawsuit.This hadn't caught my eye before. The update forces users to "activate" ActiveX controls (such as Flash) hosted on a web page. Here is the official article on how that affects our websites. I also found a blog post by Steve Smith and another by Matt Watson with discusson on workarounds.

I installed the update this morning from Windows Update to see  how it affected my ink-enabled winforms controls that are hosted in a web page (eg the Doodling website). Without any of the scripting workarounds, the effect is not really bad at first. Just by placing the cursor over the control area, I get the popup that says "click to activate and use this control." Click and I'm instantly inking. But it doesn't remember! I have to do it every time I ope the page in a new i.e. session. This is with Disable Script Debugging checked. If I refresh the page, I get a different message, "press spacebar or enter to activate the control." But just clicking still works. Odd.

Okay so that was testing on my non-tablet with a mouse. With the tablet and stylus, luckily I don't really need to tap and THEN draw. Doing that gives me an inky dot where I tapped. But I can actually just ignore the message and start drawing and it works. But this means, I will have to explain this on my website. Hmmm. Maybe I'll have to check into the scripting after all.

So the known issue is with this thing unchecked - as all good web developers have it set. I didn't experience anything different. I'll keep playing with it.

 



Don't Forget: www.acehaid.org
Monday, April 10, 2006 10:32:21 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, April 03, 2006

Two years ago, I blogged about the "Mobile PC" division at Microsoft which encompasses all of the mobility technology - Tablet PCs, handhelds etc. Today, for the first time, I noticed that this is finally catching on. There are lots of people walking around with bright orange hats. When I commented on one in the elevator to an attendee, he said "yeah, the Mobile PC team is giving them out and they are giving out a Mobile PC every day during the conference." So it sounds like people are getting it now. A mobile pc has a lot of features that enable mobility and ink is only one of those features.



Posted from BLInk!
Monday, April 03, 2006 12:26:27 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, March 22, 2006

My husband read the CNN article this morning about the Windows Vista delay. Reading "Unlike the current Windows XP, there will be no versions designed specifically for advanced 64-bit computing, multimedia computers or Tablet PCs" he interpreted that as no TabletPC capability for Vista, which is not true at all. In fact, he knows that I am using Vista on a tablet, but thought that it was going to be removed.

TabletPC functionality is built into Vista and will not be separate. That's all this means.

I wonder how many others will misinterpret that sentence?



Don't Forget: www.acehaid.org
Wednesday, March 22, 2006 8:42:05 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, February 11, 2006

I replaced one of my 512MB modules with a 1GB module in October. Time to get the old one off my desk.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=6848791085&rd=1&sspagename=STRK%3AMESE%3AIT&rd=1

 



Don't Forget: www.acehaid.org
Saturday, February 11, 2006 10:41:50 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, January 04, 2006

Because I didn't realize there was something really cool about this! I finally just happened upon it accidentally. One one of the times I rebooted, I noticed the pretty little icons for cds, thumb drives and more below the toshiba logo at startup. Pressing the left and right arrow keys highlighted the icons and voila I was able to boot from my selected device - CD.

Yah , I know - RTFM. I don't happen to have it. But now that I knew what I was looking for, I was easily able to find it online.

From the manual,

"You can also manually choose the boot-up sequence by sliding the power switch, then quickly pressing the right or left arrow keys."

Very cool feature!



Don't Forget: www.acehaid.org
Wednesday, January 04, 2006 9:58:04 PM (Eastern Standard Time, UTC-05:00)