Results 1 to 4 of 4

Thread: ActiveX EXE startup object

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 1999
    Posts
    12

    Question

    I'm having LOTS of trouble with a very simple thing, and I can't understand why. I started a quite big project as a Standard EXE program, and now that I have almost finished it I would like to change it into a ActiveX EXE program.

    No big deal, I just changed the project type property in the property window. But here comes my problem : While I had a Form as a startup object, I can't use it anymore, since VB limits me to Sub Main. So I added a Sub Main as so

    Sub Main()
    Form1.Show
    End Sub

    But VB won't even run it at startup even if it acknowledge it as the startup Sub...

    Now I'm lost. Why isn't this working ?
    -DrkMatter

    "Failure is not an option: Windows as it built-in"
    -Some guy whose name I don't remember. =P

  2. #2
    Guest

    Are you sure that your Sub Main() is in a Module?

    ___________________

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 1999
    Posts
    12
    Yes it is. and another weird thing...
    When I run Sub Main through the Immediate window, the fform appear in double.
    What's happening in here ??????
    -DrkMatter

    "Failure is not an option: Windows as it built-in"
    -Some guy whose name I don't remember. =P

  4. #4
    Guest

    Try your Sub Main() this way:

    Code:
    Sub Main
        Dim frm as Form1
        Set frm = New Form1
        frm.Show
    End Sub
    This doesn't show the global instance of Form1 but creates a new one. It works well in my ActiveX EXE projects.

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