Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Issue with debugging


Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2008, 09:32 PM
pcPirate pcPirate is offline
Regular
 
Join Date: Sep 2003
Location: M'sia
Posts: 68
Default Issue with debugging


I have created a user control project (Project2) and attach it to the parent project (Project1)

However, my issue is that whenever I'm trying to debug, VB6 IDE keep prompting "Procedure declaration does not match description of event or procedure having the same name" when I'm trying to debug the project.

I have attached the project (Issue.zip) in this thread. Pls open the file grpCtrl.vbg to debug.
The problem only arise when I attached the user control project to the parent object. However, if I run the parent from the compiled exe, there is no error prompted.

Pls advice and thanks in advance.
Attached Files
File Type: zip Issue.zip (15.9 KB, 7 views)
__________________
Nothing last forever, then what makes love an exception?

Last edited by pcPirate; 05-12-2008 at 10:22 PM.
Reply With Quote
  #2  
Old 05-13-2008, 08:30 AM
lebb's Avatar
lebb lebb is offline
Disillusioned Code Poet

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
Default

Any chance it's related to this bug?
__________________
Laura

Ita erat quando hic adveni.
Reply With Quote
  #3  
Old 05-13-2008, 05:15 PM
pcPirate pcPirate is offline
Regular
 
Join Date: Sep 2003
Location: M'sia
Posts: 68
Default

Thanks for the reply lebb.
However, I don't think it's really related to that bug.
Pls. advice and thanks in advance.
__________________
Nothing last forever, then what makes love an exception?
Reply With Quote
  #4  
Old 05-23-2008, 12:15 AM
pcPirate pcPirate is offline
Regular
 
Join Date: Sep 2003
Location: M'sia
Posts: 68
Default

Any help, pls?
__________________
Nothing last forever, then what makes love an exception?
Reply With Quote
  #5  
Old 05-23-2008, 02:34 PM
passel's Avatar
passel passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 7,714
Default

Are you sure it is not related to the issue lebb referenced?
I don't know much (anything, really) about user controls, but, based on lebb's reference, perhaps you did change the parameters since you've built the ocx. I deleted the ocx file (which shouldn't have been posted in any case), the .oca file, and all other files not part of the original source, recompiled the user control to recreate the ocx, and then opened the grpCtrl.vbg in the IDE with no problem.

But I may be missing the crux, since I don't program user controls, so may have broken a connection that would cause the problem.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #6  
Old 05-24-2008, 07:48 PM
lebb's Avatar
lebb lebb is offline
Disillusioned Code Poet

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
Default

I asked Thinker to take a look at this, and he believes it's a bug in VB6 caused by the way it handles temporary registration of controls at design time. If you use late binding and declare that event as
Public Event TestEvent2(ByRef BBB As Object)
instead of
Public Event TestEvent2(ByRef BBB As Project2.usrCtrl2)
I believe it will work. If you need the early binding for performance, you can switch it back when compiling.
__________________
Laura

Ita erat quando hic adveni.
Reply With Quote
  #7  
Old 05-25-2008, 09:27 PM
pcPirate pcPirate is offline
Regular
 
Join Date: Sep 2003
Location: M'sia
Posts: 68
Default

Thank you very much for the reply.

My company wouldn't allow me to switch the parameter type during compiling and debugging cos' it's not a good practice after all.

Since there's isn't any way of using early binding in debugging mode (in this case), I guess I would have to try another approach where the user control should'nt be passed as a parameter at all.

Anyway, I've tried searching through the Microsoft website regarding this bug, but with no luck. I'm not sure if you have found any documentation of this. If so, could you pls send me the link to it. Otherwise, it's fine. You've been really helpful no matter what.

Thanks again.
__________________
Nothing last forever, then what makes love an exception?
Reply With Quote
  #8  
Old 05-27-2008, 07:24 AM
lebb's Avatar
lebb lebb is offline
Disillusioned Code Poet

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
Default

I didn't find any specific details on that, but you could probably watch how the registry changes during debugging to confirm the issue. There are a lot of reports about VB6 bugs related to that particular error, just not in that specific context. Unfortunately, with MS no longer supporting VB6, I doubt there will be any resolution.

My advice would be to just define the parameter as Object and go with the late-binding solution, since that is what all the built-in MS control events do anyway (probably for that reason).
__________________
Laura

Ita erat quando hic adveni.
Reply With Quote
  #9  
Old 06-12-2008, 07:36 PM
pcPirate pcPirate is offline
Regular
 
Join Date: Sep 2003
Location: M'sia
Posts: 68
Default

Thanks a lot, lebb.
__________________
Nothing last forever, then what makes love an exception?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->