[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2005-05-04
8
Medium Priority
?
247 Views
Last Modified: 2010-05-02
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
Comment
Question by:Zonman
  • 3
5 Comments
 
LVL 22

Accepted Solution

by:
rspahitz earned 2000 total points
ID: 13929258
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
 
LVL 7

Expert Comment

by:Smallint
ID: 13933927
0
 

Author Comment

by:Zonman
ID: 13934088
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
 
LVL 22

Expert Comment

by:rspahitz
ID: 13937739
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
 
LVL 22

Expert Comment

by:rspahitz
ID: 14460074
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question