Windows Develop Bookmark and Share   
 index > Windows Forms Designer > what the heck? Clicked on the background image property of a form, and everything went haywire!
 

what the heck? Clicked on the background image property of a form, and everything went haywire!

I am at a loss here.

I was working on my multi-form project, and clicked on the "background image" property of the default form to see what the name of the image I used was, so I could use it on another form. All of a sudden the designer screen gave me the "one or more errors encountered while loading the designer" message. There are also 102 errors listed in my error list pane, all of them are "dataset is not defined" or "tableadapter is not defined" on all of my forms within the project.

Clicking on the first "Error Correction Options" tells me to change the following line from

"Me.CowEventsDS = New ProjectNameWithheld.CowEventsDS"
to
"Me.CowEventsDS = New Global. ProjectNameWithheld.CowEventsDS

Pretty much all the error correction options tell me to add global. infront of the dataset and tableadapter names. Why? If I go ahead and change all these to Global. Am I asking for more trouble?



What do I do now?????



  • Moved byRoahn LuoMSFTFriday, June 05, 2009 1:54 AMa windows forms issue. (From:Visual Studio Debugger)
  •  
DigitalFusion  Wednesday, June 03, 2009 10:43 PM
I did some searching, and found this post on another forum: http://bytes.com/topic/visual-basic/answers/720207-type-application-dataset-not-defined where the user had the same error I am getting. Turns out he had a class with the same name as his root namespace.

another user posted, describing my issue perfectly:


------------------------------------------
i. I'm having the same problem, only that I dont have a class name the same as my project and the
compiler always puts before the name of the dataset, the name of my project like this:

  1. Me.UnitsDS=NewRequisitionPO.UnitsDS
where RequisitionPO is the name of my project.

I temporarily fix this issue doing one of two things. Either deleting the name of my project and
leaving the line like this:
  1. Me.UnitsDS=NewUnitsDS
or writing the word global before the name of the project like this:

  1. Me.UnitsDS=NewGlobal.RequisitionPO.UnitsDS
but then again, when I go to the form and compile again it rewrites the code and the error shows up.
And if I add more datasets, the error is reflected in all of them and all the objects that have to do
with the datasets such as tableadapters.

Can anyone give me a clue on how to fix this maddening error?

Thanks in advance

Gabriela
----------------------------------------------------------------

This seems to be pointing to a naming error somewhere. All my forms and files have unique names, with the exception of a .resx file that has the same name as the project/application. However, this file has been there, and been named that since the inception and never caused an error. I dont understand what is going on.



please help! ANY suggestions or thoughts? anything at all?



DigitalFusion  Thursday, June 04, 2009 5:33 PM
Hi DigitalFusion,

Rename the .resx file in questionto be different from the root namespace of the project.

Sincerely,
Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Monday, June 15, 2009 10:17 AM

You can use google to search for other answers

Custom Search

More Threads

• customizing week numbers in DateTimePicker control
• Treeview State Image List
• Displaying list of typed datasets
• Inherited controls and design view
• Validating all controls on Form
• Vista-like Progressbar
• Hello World?
• Multicolumn tree/list view
• How to add tooltip for UserControl?
• Adding tabcontrols and grid view controls