Results 1 to 8 of 8

Thread: DLL's and Forms

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Posts
    82

    Exclamation

    Is it wise to use ActiveX DLL's to store information of a GUI? What I mean is, is it OK to store Forms in a DLL file and open them through methods?

    If not, how about in Active X EXE's?

    If still no, what would be the best way to store GUI's modularly so that when I want to update it, I do not have to change the whole thing?

    thank you

  2. #2
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Thumbs up Why not

    I display forms in ActiveX DLL's all the time and don't have any problems.

    What exactly are you concerned about?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Posts
    82
    I get this error.

    Title: Component Request Pending

    An action cannot be completed because a component (whatever the DLL) is not responding. Choose "Switch To" to activate the component and correct the problem.

    this is the code:

    -> the DLL (Test.DLL)

    ' in the DLL, I have a form (Form1) and a class module (Module1)

    'Form1
    'I have 1 command button for Form1

    Private Sub Command1_Click
    msgBox ("Hello World")
    End Sub

    'Module1
    Public Sub Show
    Form1.Show
    End Sub

    -> the EXE Project

    'I have 1 form ProjForm and 1 command button CommandProj

    Private Sub CommandProj_Click
    Dim Message As New Test.Module1
    Message.Show
    End Sub

    Please help if you could.

    * thanks *

  4. #4
    Lively Member bhaskerg's Avatar
    Join Date
    Mar 2001
    Location
    india
    Posts
    68

    Cool

    manofprayer are u sure that u'r dll has been really converted to a file with the extension .dll ?...since sometimes it'll go for "make project" and even though u can refer it from a client form u'll get the error u have mentioned...so try again to convert it into dll and refer it again in the client side...all the best.

  5. #5
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Lightbulb Modal

    In your DLL you should instantiate Form1 rather than just showing it. Also, try showing it modally.

    i.e.

    Dim frm As Form1

    Set frm = New Form1

    frm.Show vbModal

  6. #6
    Lively Member bhaskerg's Avatar
    Join Date
    Mar 2001
    Location
    india
    Posts
    68

    Cool

    There is no need for instancing the form since i tried the exact code of manofprayer and is working fine!!

  7. #7
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Wink Oh Contrare!

    It's always a good idea to instantiate your forms so you always know when you use a form whether it is a new instance or a previously existing instance.

    manofprayer,

    Does your form eventually get displayed (even if you have to click on 'Switch To'? I only ask as there is a timeout setting which dictates how long a project waits for a response from a component after a request has been made. This defaults to 0 but can be changed...

    I actually can't remember how to change it now but it can be done, honest!

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Posts
    82

    Exclamation semi-Success!!!

    first t answer your question:
    - yes, when you click the 'Switch To ...' the Form does gets displayed.

    something strange:
    -when I tried it out at home, 'coz you said it works, I noticed something different from the properties of the DLL that I've created at the office and the one I did at home. I noticed that the 'Unattended Execution' check box is disabled at home (and to let you know, my program worked well at home) and here in the office it was enabled!

    - do you have an answer for this?

    thank you.

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