Results 1 to 3 of 3

Thread: modal form from ActiveX dll

  1. #1

    Thread Starter
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    Unhappy

    I've got an application where I need to show some forms from a dll. The problem is trying to make these forms modal to the main form. I have an inkling that I've solved this problem before, but (!?) I can't remember how.
    If I make the dll form modal, without a parent, then it still locks out the main form (like it should) but is not displayed on top of the main form. This means it can get lost behind other windows etc.
    I've tried passing the parent form to the public class, but VB doesn't like it. I get an error: Private object modules cannot be used in public object modules as parameters or return types...blah...blah...blah

    Any suggestions?
    -scott
    he he he

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    New York City
    Posts
    73
    How are you loading the form? I call modal forms like this from my DLLs all the time and it works fine..

    In my main app

    Code:
    Dim clForm as new myobject.myclass
    
    clForm.show


    In my DLL class
    Code:
    Public Function show()
    
    frmabout.show vbModal  'frmabout is the form being loaded in the dll
    
    End Function
    Rich

  3. #3

    Thread Starter
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    Thumbs up thanks

    Thanks. I figured it out. It was a problem that occured while running in debug mode. Once I compiled the dll and ran from that, the modal form worked as planned.
    Regards,
    -scott
    he he he

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