Visual Studio.NET

KEVINARCHERKEVINARCHER Member Posts: 4
edited 2003-05-29 in Navision Attain
I would like to access some Visual Basic.NET DLL's I create for Navision. I heard there was a way to compile a certain way and the class would be availiable to COM apps. Is this possible and how do I do it. I was able to do this with VB 6 but seem to have lost the ability in .NET.
Kevin Archer
Developer
MSApple Technolgies

Comments

  • bruno77bruno77 Member Posts: 62
    In order to use the .NET assembly class in Navision you need to expose it to COM, see help for ComClassAttribute.

    Example:

    <ComClass(Tst.ClassId, Tst.InterfaceId, Tst.EventsId)> _
    Public Class Tst
    Public Const ClassId As String = "B153F571-F3B1-4b9b-BC5F-
    Public Const InterfaceId As String = "9850CF4D-48A9-4fed-AD60-
    Public Const EventsId As String = "37682080-B166-400d-881E-

    'This sub is required
    Public Sub New()
    MyBase.New()
    End Sub


    /Regards,

    Bruno
  • karcherkarcher Member Posts: 1
    Great I can now see the methods and properties. I have yet another question though. I want to pop open a Visual Basic form and let the user enter information and then return it to Navision. I am able to start the form but Navision forces it to the background and I cant get it to get focus. THere is an application similar to what I am trying to accomplish in the downloads section which is a text editoe that allow users to enter more then 250 characters and return it to navision. What is the correct way to pop open this form. Thanks for your help.
Sign In or Register to comment.