Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Closing ActiveX exe child windows

Hi,

I am working on an application which opens up a bunch of activeX exe forms which are set to be children of the calling form. What I need to do is to find a way to cleanly shut all of these down.

Zaphod.
0
Z_Beeblebrox
Asked:
Z_Beeblebrox
  • 3
  • 2
1 Solution
 
rmichelsCommented:
Why not create a method in the activeX EXE that tells it to shut a particular form down, or all forms.

Then the application making use of the activeX exe can call that method to close the form(s).
0
 
JonFish85Commented:
see what you can get from this idea:

Dim frm As Form

For Each frm In Forms
  Unload frm
  Set frm = Nothing
Next frm
0
 
Z_BeeblebroxAuthor Commented:
JonFish85:

That doesn't work for ActiveX exe windows.

rmichels:

That was the original plan, however we discovered that if the user end-tasked the activeX exe, then the main app tried to call the close method, the main app crashed and even doing an on error goto didn't help. As a result, we would like to find an alternative.

Zaphod.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
rmichelsCommented:
Hmmm

I'm not sure what you can do about an end-user killing the activeX exe.  The main app crashed because it's underlying client went away.

I have written a similar thing.  In my company's application we have a desktop toolbar that is basically a C++ dialog box.  There is an ActiveX exe that is used to start and track running GUI objects (called object proxy).  These GUI objects are also activeX exes. When the toolbar shuts down it tells the object proxy to shutdown all running forms.  I have an on error condition to handle GUI objects that have exited abnormally.  That has worked for me.

I suspect something in COM is tossing an error that you can't trap?  What sort of error is display on the main object when the user kills the activeX exe?
0
 
Z_BeeblebroxAuthor Commented:
Hi,

I will do some investigation when I'm at work on Monday.

Zaphod.
0
 
Z_BeeblebroxAuthor Commented:
Sorry it took so long to get around to this. I tested it and trapping the error seems to work fine. Something wierd must have been happening on that computer that day.

Zaphod.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now