Hi,
Do you want to use task pane for switching views? If so, below link will help you.
http://www.infopathdev.com/blogs/matt/archive/2006/01/11/Create-a-Custom-Task-Pane-to-Switch-Views.aspx
http://www.infopathdev.com/blogs/matt/archive/2007/05/31/InfoPath-bug-with-linking-external-files-from-custom-task-pane-HTML.aspx
Can you verify below links to understand IP 2007 managed code better.
http://msdn.microsoft.com/en-us/library/bb294378.aspx
http://blogs.technet.com/jocarpenter/archive/2006/08/28/452144.aspx
http://www.experts-exchange.com/Programming/Editors_IDEs/C_CPP_CS/Visual_CPP/Q_23844652.html
Hope this helps.