The form is set to use C# (Under Tools, Options, Design Tab)
This is the code I have
Imports Microsoft.Office.InfoPath
Imports System
Imports System.Windows.Forms
Imports System.Xml
Imports System.Xml.XPathImports mshtml
Namespace AOL2 Public Class FormCode Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) ...