Importing user control into new project
-
Sunday, June 12, 2011 8:09 AM
Hi,
I'm having a problem importing a user control into a new project.
I've created and tested a user control using the guide at http://msdn.microsoft.com/en-us/library/ttb1w24s%28v=VS.90%29.aspx
If I choose Debug>Build, a .dll file is created in the release folder.
According to what I've read, I should be able to open the toolbox in my new project, right click>choose items, browse to the dll and then import. This all works, but the control is 'greyed out' in the toolbox, so I can't drag and drop it onto the userform in my new project.
I also tried importing by 'Add Reference' in the solution explorer and got an error about using a later version of the .NET framework, so I've set both the user control and new project to compile with the .NET 3.5 framework.
Any suggestions?
Many thanks,
Mike
All Replies
-
Sunday, June 12, 2011 8:40 AM
Hi,
I'm having a problem importing a user control into a new project.
I've created and tested a user control using the guide at http://msdn.microsoft.com/en-us/library/ttb1w24s%28v=VS.90%29.aspx
If I choose Debug>Build, a .dll file is created in the release folder.
According to what I've read, I should be able to open the toolbox in my new project, right click>choose items, browse to the dll and then import. This all works, but the control is 'greyed out' in the toolbox, so I can't drag and drop it onto the userform in my new project.
I also tried importing by 'Add Reference' in the solution explorer and got an error about using a later version of the .NET framework, so I've set both the user control and new project to compile with the .NET 3.5 framework.
Any suggestions?
Many thanks,
Mike
Hello Diesel Phantom,to import the class library you need to create a new project in Solution Explorer, right-click-click application name and select add reference in the next dialog select the location where you find your class book and confirm OK.
Then you can use your dll you created earlier, but I find it strange that you can not use it.
If I understand you have trouble viewing the target framework of both the application must be the dread.Hello
Carmelo La Monica http://community.visual-basic.it/carmelolamonica/
- Marked As Answer by Diesel Phantom Sunday, June 12, 2011 9:33 AM
-
Sunday, June 12, 2011 9:34 AMThanks!
-
Sunday, June 12, 2011 9:42 AM
Thanks!
Hello Diesel Phantom,you're welcome.
Hello
Carmelo La Monica http://community.visual-basic.it/carmelolamonica/

