Solved

Terminate ActiveX DLL

Posted on 2001-09-10
7
843 Views
Last Modified: 2008-03-10
the function for terminate EXE application is "END"
using this in ActiveX dll I receive the message:
     ?Compile error: Functionality not supported in DLL?
is there another way to do it?
0
Comment
Question by:danyb
[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
  • 5
  • 2
7 Comments
 
LVL 39

Expert Comment

by:appari
ID: 6469937
setting the object variable to nothing will terminate the activex.

Dim acApp As Access.Application
Set acApp = New Access.Application
Set acApp = Nothing

0
 

Author Comment

by:danyb
ID: 6469949
my activeX application contain a FORM.
i'm openning the "from" from it.
i want to close the application from the "form".
how can i do it?
0
 
LVL 39

Expert Comment

by:appari
ID: 6469960
can you post code how you are creating the object and how you are showing the form inside dll?

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 39

Expert Comment

by:appari
ID: 6469964
>>i want to close the application from the "form".
does this mean you want to close calling application?
0
 

Author Comment

by:danyb
ID: 6469979
' activeX dll
-------------------------------------------------------
Implements ICommand
Implements ICreateCommand

Private Sub ICommand_Execute()
    ' Load the Tree form as MODAL
    Tools.Show vbModal
End Sub
------------------------------------------------------
if the form i'm using some other references.
and in the form i'm trying to close the application but...
0
 
LVL 39

Expert Comment

by:appari
ID: 6470020
this is being a dll you cannot use End statement . insted just Unload the form tolls.

and see the topic "Visual Basic Component Shutdown Rules." in MSDN for the rules to follow.

components will be released automatically when they are out of scope.
0
 
LVL 39

Accepted Solution

by:
appari earned 100 total points
ID: 6470023
Summary of Guidelines for Component Shutdown
The following guidelines summarize what you need to remember about component shutdown.

A well-behaved component does not control its own lifetime.


Don?t shut an out-of-process component down forcibly using the End statement.
As a corollary to this, don?t implement a Quit method. Releasing a component by releasing all references to its objects is good programming practice. Educate users of your component by explaining in your Help file that this is the correct way to release your component. Don?t encourage bad programming practices by giving developers a shortcut that could disrupt other clients.

Don?t prolong the life of your component needlessly by keeping a form loaded but hidden when there are no objects using it.


Avoid circular references that artificially prolong the life of your component, such as an object that holds a reference to a form that in turn holds a reference to the object. Circular references are discussed in "Dealing with Circular References," in "General Principles of Component Design."


If your component is a standalone desktop application that also provides objects, remember that the computer user is one of your clients.
Most of the work of being a good component is done for you by Visual Basic. You can go a long way by simply letting it do its job.


--------------------------------------------------------------------------------
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Title # Comments Views Activity
VBA filters 2 71
How does CurrentUser work? 10 42
passing a value with stream reader AFTER a ";" 3 83
How to hault or freeze parent form when a 2d form is open in vb6 3 43
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

733 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