|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Procedure limit for Form?will not load, kicking back a runtime error 0 in the IDE. Here is the odd part, it triggers on the call to load (or show, it doesn't matter) that form and not within the form itself. Sometimes it happens and sometimes not. Usually opening the form in the IDE and closing it again with a save stops it for a while. The only real difference is that this form has 166 procedures (according to MZ Tools). Would haveing all those procedures be mucking things up? It comes out to 5, 995 lines of code. The same error in the compil;ed EXE comes up as: Failed to activate control 'VB.UserControl'. This control may be incompatible with your application. Make sure you are using the version of the control that was provided with your application. The one user control on that form is current. I realize that is a lot of procedures and code for one form, and I suppose I could put most of it in a BAS module, at least code that doesn't reference the form in some way as much of it does. Just looking for some thoughts. "C Kevin Provance" <BillMRapedMySh***@.netblows.ms> escribió en el mensaje Hi,news:%239C9WocoJHA.1184@TK2MSFTNGP04.phx.gbl... > I've got a strange thing going on here. Occasionally I have a form that > will not load, kicking back a runtime error 0 in the IDE. Here is the odd > part, it triggers on the call to load (or show, it doesn't matter) that > form > and not within the form itself. Sometimes it happens and sometimes not. > Usually opening the form in the IDE and closing it again with a save stops > it for a while. The only real difference is that this form has 166 > procedures (according to MZ Tools). Would haveing all those procedures be > mucking things up? It comes out to 5, 995 lines of code. [...] I have a form with much code, I don't have MZ Tools installed, but I pasted the code into Word and it says: 9,415 paragraphs, 248,676 characters (without spaces). And it works fine. I don't know how many procedures, I would have to install MZ Tools to see that. C Kevin Provance wrote:
> I realize that is a lot of procedures and code for one form, and I suppose I You won't like mine. I had that once, and damned if I can pull up where it was > could put most of it in a BAS module, at least code that doesn't reference > the form in some way as much of it does. > > Just looking for some thoughts. discussed. But it was a *totally* weird hack that triggered it. (Maybe I was checking whether an array was empty by Not'ing it's varptr? It was a slimeball hack, I tellya <g>) Error 0 means VB is *totally* messed up. On the "up" side, I don't think you're anywhere near hitting hard limits. "Karl E. Peterson" <k***@mvps.org> wrote in message Well, that's good, about not hitting the limits.news:%234gWXLdoJHA.3840@TK2MSFTNGP03.phx.gbl... | You won't like mine. I had that once, and damned if I can pull up where it was | discussed. But it was a *totally* weird hack that triggered it. (Maybe I was | checking whether an array was empty by Not'ing it's varptr? It was a slimeball | hack, I tellya <g>) Error 0 means VB is *totally* messed up. | | On the "up" side, I don't think you're anywhere near hitting hard limits. I don't think I have any slimey hacks in the form in question. The code in Form_Load isn't even executing (and there is nothing in Form_Initialize). The runtime 0 occurs in Sub Main at the line: Load frmMain It's seemingly random. But if I'm to believe the errors the exe kicks out, it's got something to do with a VBControl. I'll keep Googling. :\ "Nobody" <nob***@nobody.com> wrote in message No subclassing in this case. No callbacks either.news:uXqEEheoJHA.4392@TK2MSFTNGP05.phx.gbl... | Are you subclassing anything? If so, which object? There is a 64kb limit on all objects. This includes pictures, code and
anything else contained in that object. So if your code goes beyond that you are in trouble. This does not mean words or lines in your object but at compile time... -- Show quoteHide quoteRandem Systems Your Installation Specialist The Top Inno Setup Script Generator http://www.randem.com/innoscript.html How Banks STEAL Your Money www.financialtrainingservices.org/bankreviews.htm Disk Read Error Press Ctl+Alt+Del to Restart http://www.randem.com/discus/messages/9402/9406.html?1236319938 "C Kevin Provance" <BillMRapedMySh***@.netblows.ms> wrote in message news:%239C9WocoJHA.1184@TK2MSFTNGP04.phx.gbl... > I've got a strange thing going on here. Occasionally I have a form that > will not load, kicking back a runtime error 0 in the IDE. Here is the odd > part, it triggers on the call to load (or show, it doesn't matter) that > form > and not within the form itself. Sometimes it happens and sometimes not. > Usually opening the form in the IDE and closing it again with a save stops > it for a while. The only real difference is that this form has 166 > procedures (according to MZ Tools). Would haveing all those procedures be > mucking things up? It comes out to 5, 995 lines of code. > > The same error in the compil;ed EXE comes up as: > > Failed to activate control 'VB.UserControl'. This control may be > incompatible with your application. Make sure you are using the version of > the control that was provided with your application. The one user control > on that form is current. > > I realize that is a lot of procedures and code for one form, and I suppose > I > could put most of it in a BAS module, at least code that doesn't reference > the form in some way as much of it does. > > Just looking for some thoughts. > > I had something similar happen to me and what resolved it for me was to
recreate the form. Something was messed up with the original form, and it didn't happen all the time. But after I made a new form and replaced the old form the problem went away. Daryl Show quoteHide quote "C Kevin Provance" <BillMRapedMySh***@.netblows.ms> wrote in message news:%239C9WocoJHA.1184@TK2MSFTNGP04.phx.gbl... > I've got a strange thing going on here. Occasionally I have a form that > will not load, kicking back a runtime error 0 in the IDE. Here is the odd > part, it triggers on the call to load (or show, it doesn't matter) that > form > and not within the form itself. Sometimes it happens and sometimes not. > Usually opening the form in the IDE and closing it again with a save stops > it for a while. The only real difference is that this form has 166 > procedures (according to MZ Tools). Would haveing all those procedures be > mucking things up? It comes out to 5, 995 lines of code. > > The same error in the compil;ed EXE comes up as: > > Failed to activate control 'VB.UserControl'. This control may be > incompatible with your application. Make sure you are using the version of > the control that was provided with your application. The one user control > on that form is current. > > I realize that is a lot of procedures and code for one form, and I suppose > I > could put most of it in a BAS module, at least code that doesn't reference > the form in some way as much of it does. > > Just looking for some thoughts. > > I don't know if this applies to your situation, but
I've had similar problems when working with a DLL/EXE that I'm working on and using in a project. The gist of it seems to be that VB can't really handle binary compatibility setting. Once compat. is broken it just keeps issuing warnings over and over, having trouble loading, etc. I find that I just have to wait until I've got my interfaces in final form, then clean out the mess of multiple entries that VB has created in HKCR\CLSID and HKCR\Typelib, delete my binary template file, and start over, setting binary compatibility on a new compile that won't be changing.
Show quote
Hide quote
"mayayana" <mayayaX***@rcXXn.com> wrote in message I get what you're saying here, but the only two AX controls on that form are news:ex0revnoJHA.3380@TK2MSFTNGP04.phx.gbl... | I don't know if this applies to your situation, but | I've had similar problems when working with a | DLL/EXE that I'm working on and using in a project. | The gist of it seems to be that VB can't really handle | binary compatibility setting. Once compat. is broken | it just keeps issuing warnings over and over, having | trouble loading, etc. I find that I just have to wait | until I've got my interfaces in final form, then clean | out the mess of multiple entries that VB has created | in HKCR\CLSID and HKCR\Typelib, delete my binary | template file, and start over, setting binary compatibility | on a new compile that won't be changing. Spyworks (cross task subclasser) and my own custom command button which has not been modified for years. I asked the one user I've been working with about this, and he *claims* that he reinstalled my program after wiping his hard drive and starting over, so it was technically a clean install. No left overs. I did have him delete the OCA files, but have not heard back yet.
PaintPicture
My concept for a very basic stripboard layouter in VB6 Put Date/Time on Right Side of Form.Caption With .... End With - Speed Public Thank You To Microsoft Days and Years - Data Comparing ActiveX Control Crashes - VB6 config file Copy protection and license management programs Need a Friend, Maybe |
|||||||||||||||||||||||