If you enable .NET programmability support when you install InfoPath 2007 (here's a link on that) you'll be able to use C# and can probably find more samples. Here are a few that might get you started:
http://msdn.microsoft.com/en-us/library/office/bb509311(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/office/bb251747(v=office.12).aspx
But, I'm wondering - if all you need is to open one form if a field is true and another if it is false, you might be able to do that with rules. Have you tried just using rules? If this is a form opened in InfoPath (not a browser form) you can add a rule action to open a new form template. You could have conditions - if this checkbox field is true, open this template, if that checkbox field is true open this other template. If it is browser form, you could probably do the same with hyperlinks inside sections to choose which to display for the user.