Results 1 to 8 of 8

Thread: [RESOLVED] Dll With a form

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    376

    Resolved [RESOLVED] Dll With a form

    I have a dll file that has a form. When I call the dll file it pulls up the form and runs fine but once the form load() is complete the original program that called the dll continues running. I want the program to not continue running until im finished with the .dll file is there any way to keep the program from running until the dll is exited via an exit button? Using a shell obviously has similar problems thats why i tried making a dll to act like an .exe

  2. #2

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    376

    Re: Dll With a form

    Well it's a complex form that will be called from other programs so rather that put this form is each exe that needs it I can have this dll get called from each exe and when I have to make a change to the dll I wont need to re-compile each exe and make each user re-boot their system to have the latest version

  4. #4
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Dll With a form

    Then you can start some loop in your main program right after you call that dll. In the dll you might need to set some flag so you can check for that flag in your main program and continue looping until flag is reset.

    I hope I made myself clear enough.

  5. #5
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043

    Re: Dll With a form

    Create public class variable to dll as flag. Keep it up so long as needed and write canceling to Form_QueryUnload until flag is down.
    oh1mie/Vic


  6. #6
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Dll With a form

    This seems to work.
    In the dll
    VB Code:
    1. Private Sub Class_Initialize()
    2.     Form1.Show vbModal
    3. End Sub
    And in the project using it
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim objForm As Project2.Class1
    3.     Set objForm = New Class1
    4.    
    5.     MsgBox "closed"
    6.     Set objForm = Nothing
    7. End Sub

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    376

    Re: Dll With a form

    vbModal seems to work but there is a point in wich the dll needs to stop and i know what that point is but i dont know how to stop it I tried an unload me but no luck, ill keep playing around but I've never used vbModal before so I'm not really sure what its doing.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    376

    Re: Dll With a form

    bla nevermind unload me works just fine i still had some code in my form_unload() that was messing it up.

    Thanks for the help

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