Re: Heavy Application with Multiple Modules
- From: "Lloyd Sheen" <a@xxx>
- Date: Mon, 7 Apr 2008 10:33:44 -0400
"Steve Gerrard" <mynamehere@xxxxxxxxxxx> wrote in message news:so2dnfln__MBtmfanZ2dnUVZ_uevnZ2d@xxxxxxxxxxxxxx
Mike TI wrote:April 7, 2008
Thank you very much for your reply.
Please note that a module would have both multiple forms and reports.
Sorry for asking a very basic question. How do you create a DLL in VB
Net. I have VB Net Professional Version 8 now.
When you do a new project, the template for a DLL is called a Class Library.
It would be worth it to do a test. Start with a brand new project, a Windows Application. Save it as a new project and solution.
Then go to Files, Add, New Project (Not the regular new project command, which replaces the current one). Add a Class Library.
Now you have one solution, with two projects: one a Windows Application, the second a Class Library. Select the main application in the project browser, right click, and select Add Reference. Click the Projects tab. You should be able to select your class library. This creates a reference from your main app to the class library, so you can use it in the main app. You can add more Class Library projects to the solution as needed.
An alternative to the inherited is using Interfaces. If you have forms that have different functions you can define the interfaces and have forms implement those interfaces. An interface is often called a contract.
I have often used the pattern where the main form implements the mainform interface and other forms implement one or more other interfaces. These interfaces define the methods and properties that the main form and other forms use to talk to one another.
You can use reflection to see if a form implements a certain interface and if it does then use that interface rather than form as the type of variable.
One "drawback" is that each form has to implement the interface.
LS
.
- References:
- Heavy Application with Multiple Modules
- From: Mike TI
- Re: Heavy Application with Multiple Modules
- From: Cor Ligthert [MVP]
- Re: Heavy Application with Multiple Modules
- From: Mike TI
- Re: Heavy Application with Multiple Modules
- From: Steve Gerrard
- Heavy Application with Multiple Modules
- Prev by Date: Re: Pooled Connection Strings
- Next by Date: Re: Pooled Connection Strings
- Previous by thread: Re: Heavy Application with Multiple Modules
- Next by thread: Re: Heavy Application with Multiple Modules
- Index(es):
Relevant Pages
|