ActiveX EXE and Forms

Hi,
I have an ActiveX EXE running on my server, and I also have a client application that uses the AXE.

The AXE has a form that is supposed to be shown when the AXE is started.  This happens when I manually startup the AXE.
However, when the client starts up and asks the server to start the AXE the AXE starts and the form is not shown.

What am I missing?

Spri
SpriAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
huttingerConnect With a Mentor Commented:
Check your DCOM settings (using dcomncfg.exe).  Make sure that the AXE server program is running under the INTERACTIVE USER.  Find you app in the Applications list, double click it, go to the identity tab, and make sure the Interactive user is selected.  Apply changes and then see what happens.  Make sure ALL copies of the AXE are killed on your server before doing this, as new instances may not be started if one is already running out there.

If it is running under anything else it more than likly will be in a different user context -- and not shown.

Note that when you rebuild your app, this setting may need to be re-applied.
0
 
samopalCommented:
Add Module to your project with sub Main
Sub Main()
   myForm.Show
End Sub

In Project Properties set sub Main as Startup Object

HTH
0
 
SpriAuthor Commented:
That is how it is currently setup.(I probably should have mentioned that earlier)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
samopalCommented:
I'm sorry, but it MUST work! This code is from my real project, and it works fine! May be you forget something....
0
 
SpriAuthor Commented:
It works when I physically start up the service myself...but when the client makes the request for the object the form is no where to be seen..and the EXE is running because the client is able to communicate to it.
0
 
samopalCommented:
You are doing smth. wrong. Try this example :

Create new ActiveX Exe

in class1

Option Explicit

Public Function gettime() As String
    gettime = Time
End Function

Add Form1 (it will be empty)

Add Module1 with:

Option Explicit

Sub Main()
    Form1.Show
End Sub


In Project Properties set sub Main as Startup Object (!!!) it's important

Save project as onlyTest and compile it
Then create test project (standart EXE) with Module1

Option Explicit

Sub main()
    Dim test As New onlyTest.Class1
    MsgBox "Server Time = " & test.gettime
End Sub


0
 
SpriAuthor Commented:
Thank you.
0
All Courses

From novice to tech pro — start learning today.