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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

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
huttingerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.