Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Use an existing VB.Net form in another project

Posted on 2013-06-04
5
Medium Priority
?
508 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 1500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

730 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