View Single Post
  #1 (permalink)  
Old January 23rd, 2012, 10:42 PM
Idontnodou Idontnodou is offline
Registered User
Points: 29, Level: 1
Points: 29, Level: 1 Points: 29, Level: 1 Points: 29, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Location: Wisconsin USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default User Control Constant Error Correction

Anyone:

I have a project that I am designing a User Control to use within. I started a Windows Forms Project, then I am laying out the User Control in-project. I don't want to compile the user control as a DLL, I want to keep it as a part of my final form project.

The problem I have is: Every time I run the project, an Exception Error pops up which says "Type 'ApplicationName.ControlOnFormName' is not defined. If I select the top suggestion... It changes the Form Designer code as follows:


Me.ControlOnFormName = New ProjectName.UserControlName()

Me.ControlOnFormName = New Global.ProjectName.UserControlName()


Now... The application will run fine, over and over, until I close the Form Designer. The Form Designer, upon closing, sets the code back to the top line. (No Global)

(Which is the never-ending loop: I correct - It runs fine - I close the Designer - It errors...) Now... The .exe file always runs if I build after the correction... : : stumped : :

Why does this happen??? And... is there a better way to keep a User Control within the project without having to reference a dll????

Ken C
Madison WI
Reply With Quote