Solved

Use an existing VB.Net form in another project

Posted on 2013-06-04
5
394 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
  • 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now