Results 1 to 3 of 3

Thread: Unload a Form in DLL (how?)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Location
    Philippines
    Posts
    218

    Unload a Form in DLL (how?)

    Hi guys,

    I'm working with a VB6 Form and using a DLL which I created in VB6 ActiveX DLL.

    On this Form, I call one method from the DLL, and after calling that method I want my form to be unloaded.

    How can I do this?

    Thank you.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Unload a Form in DLL (how?)

    I'm not sure how VB works exactly.. it is very undetermined and unpredictable what it will do.. but from a C++ programmers point of view.. this would be very bad practice.

    Your program will no doubt leave the handle to the DLL open and sitting in memory somewhere.. as well as a few other resources.

    What you SHOULD do, is set a flag in the DLL, check for it in the Form, and unload both from the form.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Unload a Form in DLL (how?)

    Quote Originally Posted by rpc86
    On this Form, I call one method from the DLL, and after calling that method I want my form to be unloaded.
    Then unload it from your VB6 program. The DLL does not have to become involved in mundane tasks like unloading forms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width