I am getting into the same issue. I managed to find a get around, to use InfoPath 2003 object model instead of InfoPath 2007 object model.
Go to Form, Options and set the Form template code language to C# (InfoPath 2003 Compatible) and add the following code,
[InfoPathEventHandler(MatchPath = "btnHello", EventType = ...