• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

VB6 sp5 Picture box control vanishes from screen, other usercontrols turn into Pictureboxes

More often then I would care to see, my rather large VB project behaves in a most annoying manner.

1.I use a picturebox as a container for user controls (to achieve similar to wizard or guide effect).  Occassionally if I compile but don't save first, the picture box disapears, but the child user controls remain.

2.Sometimes usercontrols become Picturebox (particularly after VB crashes (which it does a lot))

3.Occassionally, OCX controls get references as if they are dlls (or for the OCA file) including standard Microsoft Controls.

Any ideas?
0
Zonman
Asked:
Zonman
  • 3
1 Solution
 
rspahitzCommented:
Whenever VB loses reference to an undefined control type (like a usercontrol) it will often revert it into a picturebox.

Usually this occurs when the ctx file is corrupt or missing.

Unfortunately, VB6 seems to have a lot of problems with large project.  You may want to consider trying to break the project up into multiple projects if possible, or at least for initial development, then reintegrate things after various modules are completed.
0
 
SmallintCommented:
0
 
ZonmanAuthor Commented:
I have not tried SP6 as the list of bugs fixed did not include anything I could see as necessarily to solved any problems for me.  I will try on the assumption that they haven't told us the full story.

The comment that VB loses references to undefined controls; we already have broken program down into a logical set of OCX's and dll so to break it down further would be impossible at this stage.

The question really has to be HOW does the ctx file become corrupt or missing.  The majority of times this problem occurs straight after a compile, particularly when you remember to do a SAVE after the compile.... Why would you not automate saving before compile (as VB does before running in the IDE).
0
 
rspahitzCommented:
Again, I think the problem is the complexity of VB in trying to assemble large blocks of memory.  This is a bug that I've seen but haven't been able to isolate.

Maybe you could add the controls at run-time, even though this is a major pain.
0
 
rspahitzCommented:
Points to rspahitz for identifying that VB has internal compile bugs that sometimes corrupt the vbx or ctx files when the project is too large.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now