Re: Heavy Application with Multiple Modules




"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

.



Relevant Pages

  • COM -> DCOM -> .Net EXE
    ... The assembly is implemented as a dll, ... interfaces for use with COM. ... considering wrapping the assembly in an EXE, and maybe using DCOM to ... pass the required parameters from the COM app to the .Net side. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: QueryInterface failure.
    ... Not sure what you mean by a DLL desribing all interfaces. ... Microsoft MVP, MCSD ... Compile the common IDL file that containing all the shared interfaces ...
    (microsoft.public.vc.atl)
  • Is there a way to implement pure IDispatch interfaces in C++?
    ... I have a peculiar problem that I am trying to solve. ... This dll has a couple of dual interfaces. ... These com objects are being called by a VB app. ...
    (microsoft.public.vc.atl)
  • Re: DLL Vs. COM
    ... > functions from a DLL, ... I would guess at interface consistency (standardised interfaces like ... A perfect example from my own work is that all video sources that are ... In the case of the shell I can be the DLL ...
    (microsoft.public.vc.atl)
  • Re: Using Labview 8 with MS Visual Studio .net 2003 to create .lsb file
    ... You say that you would get problems when using your C++ interfaces from ... a DLL due to compiler differences. ... you have only one DLL to create instead of many CIN code resources. ... interfacing to the different DLLs/shared libraries on all the different ...
    (comp.lang.labview)