Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Closing ActiveX exe child windows

Posted on 2001-06-15
6
Medium Priority
?
248 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
[X]
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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Accepted Solution

by:
rmichels earned 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

670 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