?
Solved

Terminate ActiveX DLL

Posted on 2001-09-10
7
Medium Priority
?
845 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 400 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

770 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