Help major error in application!!!!!!

apricotx

New member
Joined
Jan 10, 2010
Messages
3
Programming Experience
1-3
I get this error exception everytime I try an debug:



System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: An error occurred creating the form. See Exception.InnerException for details. The error is: The form referred to itself during construction from a default instance, which led to infinite recursion. Within the Form's constructor refer to the form using 'Me.'"
Source="ApriCoT - Krypton"
StackTrace:
at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at WindowsApplication1.My.MyProject.MyForms.get_Form1()
at WindowsApplication1.My.MyApplication.OnCreateMainForm() in C:\Users\Mark\Documents\Visual Studio 2008\Projects\ApriCoT - Krypton\ApriCoT - Krypton\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.InvalidOperationException
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: The form referred to itself during construction from a default instance, which led to infinite recursion. Within the Form's constructor refer to the form using 'Me.'"
Source="ApriCoT - Krypton"
StackTrace:
at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at WindowsApplication1.My.MyProject.MyForms.get_newapp()
at WindowsApplication1.Form1..ctor() in C:\Users\Mark\Documents\Visual Studio 2008\Projects\ApriCoT - Krypton\ApriCoT - Krypton\Form1.vb:line 335
InnerException: System.InvalidOperationException
Message="The form referred to itself during construction from a default instance, which led to infinite recursion. Within the Form's constructor refer to the form using 'Me.'"
Source="ApriCoT - Krypton"
StackTrace:
at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 180
at WindowsApplication1.My.MyProject.MyForms.get_Form1()
at WindowsApplication1.newapp.KryptonTextBox1_TextChanged(Object sender, EventArgs e) in C:\Users\Mark\Documents\Visual Studio 2008\Projects\ApriCoT - Krypton\ApriCoT - Krypton\newapp.vb:line 5
at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
at ComponentFactory.Krypton.Toolkit.KryptonTextBox.k(Object A_0, EventArgs A_1)
at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)
at System.Windows.Forms.Control.set_Text(String value)
at System.Windows.Forms.TextBoxBase.set_Text(String value)
at System.Windows.Forms.TextBox.set_Text(String value)
at ComponentFactory.Krypton.Toolkit.KryptonTextBox.set_Text(String value)
at WindowsApplication1.newapp.InitializeComponent() in C:\Users\Mark\Documents\Visual Studio 2008\Projects\ApriCoT - Krypton\ApriCoT - Krypton\newapp.Designer.vb:line 38
at WindowsApplication1.newapp..ctor()
InnerException:
 
This is the problem that you have to fix:
The error is: The form referred to itself during construction from a default instance, which led to infinite recursion. Within the Form's constructor refer to the form using 'Me.'"
In your main form Form1 you are from what this message says refering to the default instance 'Form1' when you should be referring to 'Me'.
 
Back
Top