Solved

Use an existing VB.Net form in another project

Posted on 2013-06-04
5
482 Views
Last Modified: 2013-06-13
I am trying to take a complex form which exists in one project into another project.

The form has a couple of datasets and about 10 table adaptors.

Is there any way to do this? - I have been trying with a simple form with one table adaptor with no success
0
Comment
Question by:grwallace
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 39218671
add new class library project and add the complex form with all the datasets and other stuff the form uses.
now u can use the dll in the 2 projects by adding the project reference in visual studio.
0
 

Author Comment

by:grwallace
ID: 39218768
Thanks for the suggestion, but how do I go about this? it is something I have never done before.

I tried creating a class library project then add existing items then copying the items in. It gave the error "The Typed Dataset will Not Compile" etc and overflowed with errors.
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39218829
after you create the class library project, copy all relevant files from the explorer (not visual studio), into the class library directory.
then from visual studio use add existing to add all the files from the directory.
0
 

Author Comment

by:grwallace
ID: 39218958
Can't seem to get this to work.

I have created a simple form project with a single table in the dataset and copied everything into the class library project but all I get is hundreds of errors. Any assistance would be gratefully received.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39242361
Datasets are added to the project not form so you would need to add existing datasets as well. References to these datasets are usually prefixed with project name so you will have problems there. You may have to add form and datasets to DLL project and then redo bindings.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question