Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Closing ActiveX exe child windows

Posted on 2001-06-15
6
233 Views
Last Modified: 2012-05-04
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
Comment
Question by:Z_Beeblebrox
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:rmichels
ID: 6196424
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
 
LVL 6

Expert Comment

by:JonFish85
ID: 6196434
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
 
LVL 7

Author Comment

by:Z_Beeblebrox
ID: 6196749
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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 
LVL 3

Accepted Solution

by:
rmichels earned 50 total points
ID: 6197595
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
 
LVL 7

Author Comment

by:Z_Beeblebrox
ID: 6198759
Hi,

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

Zaphod.
0
 
LVL 7

Author Comment

by:Z_Beeblebrox
ID: 6212312
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question