CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2000
    Location
    india
    Posts
    191

    Error during design time

    Hi,

    When I run the program in design time, some times I get the error 'Control array element 0 does not exist'. Sometimes, instead of 0, some other number appears. This behaviour is very irregular. For the same sequence of operation, this error does not appear always. When same program is run through executable, this error never comes. What could be the reason for this erratic behaviour?

    Thanks in advance.


  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Error during design time

    a guess (I know I may have totally missed the point):
    You design your appication in ide dropping controls; sometimes you copy nad paste them (answering "yes" to the windowBox that appears).
    You add code, then you modify ide deleting some of those pasted controls. Is this the case?


    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  3. #3
    Join Date
    Aug 2000
    Location
    india
    Posts
    191

    Re: Error during design time

    It's a huge application and copy & paste of controls could have happened at some stage.

    I understand, if any of the controls in control array is deleted and the same is refereed, then error message 'Control array element 0 doesnot exist' can some. But I think this is not the case, as error doesnot appear always. Moreover, it doesnot appear when executable is run.

    This behaviour is very irregular. For the same sequence of operation, error doesnot appear always. This makes it very difficult to debug also.




  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Error during design time

    So, it seems as if you have a thirdy part (or a your developed) OCX (or maybe you sublcassed a standard control) and as if it has a bug inside in its initialization code...Or maybe you need to install a servicepack for Vb (suggested: from servicepack 4 to above)

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  5. #5
    Join Date
    Aug 2000
    Location
    india
    Posts
    191

    Re: Error during design time

    I am using VB5.0 Enterprise edition. But, I don't know which is the service pack. How to get and install latest service pack?

    Yes. I am using third party controls like sheridan controls and crystal reports. But, could it be the problem with any of them? Or, could it be the problem with Microsoft controls itself?



  6. #6
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: This is beyond my knowledge

    Sorry, I do not have an answer about where exactly matter is. You may find informations at microsoft.com (look for downloads to search a servicepack for vb5 enterprise edition), at sheridan (do not know the page) and at seagate.
    Good luck.



    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

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