Results 1 to 5 of 5

Thread: On Win7: Vb6 Initialize Sub runs, form won't load/show gives "unexpected error"

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Posts
    106

    Angry On Win7: Vb6 Initialize Sub runs, form won't load/show gives "unexpected error"

    I’m having a very strange result when running my program on a specific user’s Windows 7 64-bit computer. What happens is that the program’s Form_Initalize routine completes successfully. But it appears that when the Sub_Form starts to fire, the program immediately crashes returning an “Unexpected error”. Any suggestions would be much appreciated.

  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: On Win7: Vb6 Initialize Sub runs, form won't load/show gives "unexpected error"

    The form is using a custom control. The OCX for this control is in the same folder as the application EXE. The OCX is not registered correctly. VB runtime tries to autoregister the OCX but fails as the process is not run elevated.

    Second option, there is no free space in TEMP folder. VB runtime tries to save the form's icon to a file in this TEMP folder before loading it and deleting it in a very fast order but fails on first step.

    cheers,
    </wqw>

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Posts
    106

    Re: On Win7: Vb6 Initialize Sub runs, form won't load/show gives "unexpected error"

    Quote Originally Posted by wqweto View Post
    The form is using a custom control. The OCX for this control is in the same folder as the application EXE. The OCX is not registered correctly. VB runtime tries to autoregister the OCX but fails as the process is not run elevated.

    Second option, there is no free space in TEMP folder. VB runtime tries to save the form's icon to a file in this TEMP folder before loading it and deleting it in a very fast order but fails on first step.

    cheers,
    </wqw>
    Thank you for your reply. The only thing that is coming up is what I would consider standard .OCX, as below. The installer is actually "Run as Administrator" as well...any other insight you or others have most welcomed!

    Name:  2018-01-17_12-31-43.jpg
Views: 325
Size:  69.2 KB

  4. #4
    gibra
    Guest

    Re: On Win7: Vb6 Initialize Sub runs, form won't load/show gives "unexpected error"

    Quote Originally Posted by swambast View Post
    I’m having a very strange result when running my program on a specific user’s Windows 7 64-bit computer. What happens is that the program’s Form_Initalize routine completes successfully. But it appears that when the Sub_Form starts to fire, the program immediately crashes returning an “Unexpected error”. Any suggestions would be much appreciated.
    Make a sample project that reproduce the problem, zip-it and attach here.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Posts
    106

    Re: On Win7: Vb6 Initialize Sub runs, form won't load/show gives "unexpected error"

    Hi, thanks for your response but honestly that doesn't seem practical to me. I was just looking for some general guidance or advice from others that might have run into this - but was surprised to find so few responses. Perhaps it might be a case of .ocx registration/compatibility issues since the Initialize sub runs but the form won't show...

Tags for this Thread

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