CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2001
    Posts
    12

    Problem with multiple forms

    Ok i have a prob with distributing. On any computer that has VB installed on it, theres no problem whatsoever, however when being run on a comp that has no VB on it. I get the error that the files not found and what its referring to are the other forms in the program. Only 2 forms open, and the other 2 dont. There is no difference in how i code it to open the form. I say formname.show and i get file not found. Please help. I know this is a dumb question but i have been up for the past 3 hours trying to figure this out and it eludes me. Please help a young programmer out.


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Problem with multiple forms

    My guess is that the two forms that don't open use a file that isn't installed on the target computer. How did you install the files? Did you copy them, or did you use an installation wizard?
    Also, check for late bound createations, like CreateObject, if using that, most wizards won't detect it as a needed refference.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Sep 2001
    Posts
    12

    Re: Problem with multiple forms

    I installed the files using the P & D wizard. Also it seems it has a problem with mshtml.tlb, however that file is on the target comp.

    Schenn


  4. #4
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Problem with multiple forms

    Make sure the file is correctly registered, or register it yourself using regsvr32.
    Also, what is the exact error message you get, including error number.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  5. #5
    Join Date
    Sep 2001
    Posts
    12

    Re: Problem with multiple forms

    I get error 007 file not found. What do you mean registered?


  6. #6
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Problem with multiple forms

    This means you are probably opening a file or deleting, or copying or whatever operation you might do on a file, and the file does not exist.
    What do you do in the form load, Probably something with files.
    if you are addressing the file using App.path, note that App.Path does not return a trailing "\", unless the app is located in a root directory, like "c:\", otherwise, you will need to add it.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  7. #7
    Join Date
    Sep 2001
    Posts
    12

    Re: Problem with multiple forms

    no i type in the path and i made sure that the path exists and is spelled the same...which it is. It seems to be related to mshtml.tlb



  8. #8
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Problem with multiple forms

    Strange, really stange, I looked at the code you gave me, and error 7 is out fo memory. This makes me think in the way of a control or dll that generates the error rather then VB.

    What commonly happens is that dll might get split up with later versions, so that the dll itself stays smaller, but that for specific calls, it makes calls to other dlls. If you are using such dll, it is hard to determine which other dlls it might use.

    One other thing that could have happended is that the PDW (package and deployment wizard) has only included the type library. If so, PDW did not include mshtml.dll, the file which contains the code, mshtml.tbl is only a typelibrary. Check for mshtml.dllm on the other systems, and if needed, copy it and register it.

    Registration is needed for programs to use the dll. It writes away an entry in the registry, so that programs know where a specific class is located, and in what file. You can use regsvr32 to do this for you (thank god). Just start a command prompt, CD yourself to the directory the dll is placed in, and type regsvr32 mydll.dll. You should get a message (hopefully succesful)

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured