DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5

Thread: ActiveX EXE

  1. #1
    andrew Guest

    ActiveX EXE


    I have a class named Messenger. Other projects can create instances of Messenger
    then use it's public methods like init(), display() and send(). This works
    fine.

    However, I want Messenger to be able to execute on it's own. I have made
    the project an ActiveX EXE. Everything still works when another project
    instanciates Messenger. How do I define the order of methods that I want
    to run if Messenger is executed by itself?

  2. #2
    Sachin Guest

    Re: ActiveX EXE


    Hi
    Since its an ActiveX exe what u can do is add one module to your Exe add
    the Public Sub Main() routine in it & in the routine check whether your Exe
    is run standalone or instanciated by a client by using the following code:
    *
    Public Sub Main()
    If app.startmode = vbStandAlone Then
    'standalone app
    End If
    End Sub
    *
    You'll also have to set the Project Properties to make Sub Main your starting
    point.

    cya on the dark side of the moon..
    Sachin
    "andrew" <atwhepner@humboldtbank.com> wrote:
    >
    >I have a class named Messenger. Other projects can create instances of

    Messenger
    >then use it's public methods like init(), display() and send(). This works
    >fine.
    >
    >However, I want Messenger to be able to execute on it's own. I have made
    >the project an ActiveX EXE. Everything still works when another project
    >instanciates Messenger. How do I define the order of methods that I want
    >to run if Messenger is executed by itself?



  3. #3
    Sachin Guest

    Re: ActiveX EXE


    Hi
    Since its an ActiveX exe what u can do is add one module to your Exe add
    the Public Sub Main() routine in it & in the routine check whether your Exe
    is run standalone or instanciated by a client by using the following code:
    *
    Public Sub Main()
    If app.startmode = vbStandAlone Then
    'standalone app
    End If
    End Sub
    *
    You'll also have to set the Project Properties to make Sub Main your starting
    point.

    cya on the dark side of the moon..
    Sachin
    "andrew" <atwhepner@humboldtbank.com> wrote:
    >
    >I have a class named Messenger. Other projects can create instances of

    Messenger
    >then use it's public methods like init(), display() and send(). This works
    >fine.
    >
    >However, I want Messenger to be able to execute on it's own. I have made
    >the project an ActiveX EXE. Everything still works when another project
    >instanciates Messenger. How do I define the order of methods that I want
    >to run if Messenger is executed by itself?



  4. #4
    Sachin Guest

    Re: ActiveX EXE


    The constant shud be vbSModeStandAlone rather than vbStandAlone sorry for
    the goof up!
    "Sachin" <sachin_nigam@yahoo.com> wrote:
    >
    >Hi
    >Since its an ActiveX exe what u can do is add one module to your Exe add
    >the Public Sub Main() routine in it & in the routine check whether your

    Exe
    >is run standalone or instanciated by a client by using the following code:
    >*
    >Public Sub Main()
    >If app.startmode = vbStandAlone Then
    >'standalone app
    >End If
    >End Sub
    >*
    >You'll also have to set the Project Properties to make Sub Main your starting
    >point.
    >
    >cya on the dark side of the moon..
    >Sachin
    >"andrew" <atwhepner@humboldtbank.com> wrote:
    >>
    >>I have a class named Messenger. Other projects can create instances of

    >Messenger
    >>then use it's public methods like init(), display() and send(). This works
    >>fine.
    >>
    >>However, I want Messenger to be able to execute on it's own. I have made
    >>the project an ActiveX EXE. Everything still works when another project
    >>instanciates Messenger. How do I define the order of methods that I want
    >>to run if Messenger is executed by itself?

    >



  5. #5
    Sachin Guest

    Re: ActiveX EXE


    The constant shud be vbSModeStandAlone rather than vbStandAlone sorry for
    the goof up!
    "Sachin" <sachin_nigam@yahoo.com> wrote:
    >
    >Hi
    >Since its an ActiveX exe what u can do is add one module to your Exe add
    >the Public Sub Main() routine in it & in the routine check whether your

    Exe
    >is run standalone or instanciated by a client by using the following code:
    >*
    >Public Sub Main()
    >If app.startmode = vbStandAlone Then
    >'standalone app
    >End If
    >End Sub
    >*
    >You'll also have to set the Project Properties to make Sub Main your starting
    >point.
    >
    >cya on the dark side of the moon..
    >Sachin
    >"andrew" <atwhepner@humboldtbank.com> wrote:
    >>
    >>I have a class named Messenger. Other projects can create instances of

    >Messenger
    >>then use it's public methods like init(), display() and send(). This works
    >>fine.
    >>
    >>However, I want Messenger to be able to execute on it's own. I have made
    >>the project an ActiveX EXE. Everything still works when another project
    >>instanciates Messenger. How do I define the order of methods that I want
    >>to run if Messenger is executed by itself?

    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links