Equivalent of an Activex EXE in VB.Net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nikkita

    Equivalent of an Activex EXE in VB.Net

    Software such as Excel or Word exposes a COM object model which allows
    them to be automated by any language that can call COM objects.

    As I understand it, I can do the same in VB6 by writing an Activex EXE.
    Such a program can have a GUI which will be accessed by users in the
    normal way as well as exposing a COM object model.

    How can I do the .Net equivalent in VB.Net? According to VB.Net help, the
    VB.Net equivalent of an Activex EXE is a Class Library. But a Class
    Library project doesn't appear to allow me to choose a starting point -
    it's only intended to export objects to be called from elsewhere. This is
    all very well but how do I write a program in VB.Net with a GUI which can
    also export its object model to allow it to be automated/consumed by other
    programs?
  • Tom Shelton

    #2
    Re: Equivalent of an Activex EXE in VB.Net

    On 2005-04-26, Nikkita <nikkita@cix.co .uk> wrote:[color=blue]
    > Software such as Excel or Word exposes a COM object model which allows
    > them to be automated by any language that can call COM objects.
    >
    > As I understand it, I can do the same in VB6 by writing an Activex EXE.
    > Such a program can have a GUI which will be accessed by users in the
    > normal way as well as exposing a COM object model.
    >
    > How can I do the .Net equivalent in VB.Net? According to VB.Net help, the
    > VB.Net equivalent of an Activex EXE is a Class Library. But a Class
    > Library project doesn't appear to allow me to choose a starting point -
    > it's only intended to export objects to be called from elsewhere. This is
    > all very well but how do I write a program in VB.Net with a GUI which can
    > also export its object model to allow it to be automated/consumed by other
    > programs?[/color]

    The closest equivalent would be .NET remoting... Your application can
    host objects that other processes can get hold of and send commands.

    --
    Tom Shelton [MVP]

    Comment

    • Oenone

      #3
      Re: Equivalent of an Activex EXE in VB.Net

      Nikkita wrote:[color=blue]
      > How can I do the .Net equivalent in VB.Net?[/color]

      If it helps, you can reference .exes in VS2005...

      --

      (O)enone



      Comment

      • Chris Dunaway

        #4
        Re: Equivalent of an Activex EXE in VB.Net

        You would have to create a Class Library that exposes your object
        model. It can also contain GUI elements like forms and dialog boxes.
        You would then have to create a Windows Forms Application to allow the
        app to run stand alone.

        As was pointed out by Oenone, VS2005 will allow the referencing of
        ..exe's

        Comment

        • rmacias

          #5
          Re: Equivalent of an Activex EXE in VB.Net

          Just FYI, the VS.NET 2003 IDE does not allow you to reference *.exe files.
          However, if you compile your project through the command line, it will allow
          you to reference *.exe files. Try it out, it works :)

          "Chris Dunaway" wrote:
          [color=blue]
          > You would have to create a Class Library that exposes your object
          > model. It can also contain GUI elements like forms and dialog boxes.
          > You would then have to create a Windows Forms Application to allow the
          > app to run stand alone.
          >
          > As was pointed out by Oenone, VS2005 will allow the referencing of
          > ..exe's
          >
          >[/color]

          Comment

          • Nikkita

            #6
            Re: Equivalent of an Activex EXE in VB.Net

            In article <#RUfj6hSFHA.31 44@tk2msftngp13 .phx.gbl>,
            tshelton@YOUKNO WTHEDRILLcomcas t.net (Tom Shelton) wrote:
            [color=blue][color=green]
            > > Software such as Excel or Word exposes a COM object model which
            > > allows them to be automated by any language that can call COM objects.
            > >
            > > As I understand it, I can do the same in VB6 by writing an Activex
            > > EXE. Such a program can have a GUI which will be accessed by users in
            > > the normal way as well as exposing a COM object model.
            > >
            > > How can I do the .Net equivalent in VB.Net? According to VB.Net help,
            > > the VB.Net equivalent of an Activex EXE is a Class Library. But a
            > > Class Library project doesn't appear to allow me to choose a starting
            > > point - it's only intended to export objects to be called from
            > > elsewhere. This is all very well but how do I write a program in
            > > VB.Net with a GUI which can also export its object model to allow it
            > > to be automated/consumed by other programs?[/color]
            >
            > The closest equivalent would be .NET remoting... Your application can
            > host objects that other processes can get hold of and send commands.[/color]

            Thanks, I'll look into that.

            Comment

            • Nikkita

              #7
              Re: Equivalent of an Activex EXE in VB.Net

              In article <ecPLLelSFHA.13 84@TK2MSFTNGP09 .phx.gbl>, oenone@nowhere. com
              (Oenone) wrote:
              [color=blue]
              > Nikkita wrote:[color=green]
              > > How can I do the .Net equivalent in VB.Net?[/color]
              >
              > If it helps, you can reference .exes in VS2005...[/color]

              Thanks, this could be useful.

              Comment

              • Nikkita

                #8
                Re: Equivalent of an Activex EXE in VB.Net

                In article <1114521988.668 330.239820@o13g 2000cwo.googleg roups.com>,
                dunawayc@gmail. com (Chris Dunaway) wrote:
                [color=blue]
                > You would have to create a Class Library that exposes your object
                > model. It can also contain GUI elements like forms and dialog boxes.
                > You would then have to create a Windows Forms Application to allow the
                > app to run stand alone.
                >
                > As was pointed out by Oenone, VS2005 will allow the referencing of
                > .exe's[/color]

                I see, thanks for your help. Things are becoming clearer now.

                Comment

                • Nikkita

                  #9
                  Re: Equivalent of an Activex EXE in VB.Net

                  In article <578B9681-C7A5-45F3-9799-98891880097D@mi crosoft.com>,
                  rmacias@newsgro up.nospam (=?Utf-8?B?cm1hY2lhcw= =?=) wrote:
                  [color=blue]
                  > Just FYI, the VS.NET 2003 IDE does not allow you to reference *.exe
                  > files. However, if you compile your project through the command line,
                  > it will allow you to reference *.exe files. Try it out, it works :)[/color]

                  That's very interesting, thanks. I'll take a look at that.

                  Comment

                  Working...