Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am running VB .net standard edition. I have created a usercontrol called "PlusMinus". After first compile, it appears fine in my toolbox. But when I add one to my main "ToolManager" form, Windows Form Designer insists on putting them as "ToolManager.PlusMinus" which results in an error of "Type 'ToolManager.PlusMinus" is not defined.". If i'm lucky, I can just change the Windows Form Designer code to define them as simply "PlusMinus", rempving the "ToolManager." part. This will usually solve the problem for a while. But if i move ANY other controls around, or make changes to the PlusMinus usercontrol, the this error comes back.

If I'm unlucky, my usercontrols disappear entirely and I have to re-add them, and then hack the code as described above. This is getting VERY annoying. Am I doing something wrong?

I made the usercontrol right in same project as main form. I cannot find a way to add a referce to the usercontrol or to add it to "imports" declaration. Doesnt seem to exist anywhere. Even tried "imports PlusMinus" and it didnt seem to help.

I would just make a dll or something out of the usercontrol, but of course I can't (Can I?) with standard edition.

PLEASE HELP!

Posted
You need to put the control in a seperate DLL file to remove this error, VS.Net doesn't like it when the control is in the the same project, probably something to do with the debug system. Just add a DLL project, attach it to your current solution and add a reference to the DLL project within your primary project(Right Click References[in Solution Explorer]>Add Reference).
.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
  • *Gurus*
Posted
Visual Studio copes fine with a control in the same project, on my machine. The problem is likely caused by the fact that his form is called ToolManager and his root namespace is the same. Therefore the generated code won't be valid.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

AndreRyan: I am using STANDARD edition. This does not allow me to make DLL projects!

 

divil:

Ok, fair enough. What to change where? I'm a little unlclear.

Posted

Change the name of the form to something other than the project name or vice versa.

 

Divil:

I'm using the Academic version and have a problem with controls in the same project but I put the controls in a DLL project and the errors stopped, the designer seems to want all the controls to be compiled before they are used.

.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...