 |

05-12-2008, 09:32 PM
|
|
Regular
|
|
Join Date: Sep 2003
Location: M'sia
Posts: 68
|
|
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.
|
__________________
Nothing last forever, then what makes love an exception?
Last edited by pcPirate; 05-12-2008 at 10:22 PM.
|

05-13-2008, 08:30 AM
|
 |
Disillusioned Code Poet
Retired Moderator * Guru *
|
|
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
|
|
__________________
Laura
Ita erat quando hic adveni.
|

05-13-2008, 05:15 PM
|
|
Regular
|
|
Join Date: Sep 2003
Location: M'sia
Posts: 68
|
|
|
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?
|

05-23-2008, 12:15 AM
|
|
Regular
|
|
Join Date: Sep 2003
Location: M'sia
Posts: 68
|
|
__________________
Nothing last forever, then what makes love an exception?
|

05-23-2008, 02:34 PM
|
 |
Sinecure Expert
Super Moderator * Guru *
|
|
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 7,714
|
|
|
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.
|

05-24-2008, 07:48 PM
|
 |
Disillusioned Code Poet
Retired Moderator * Guru *
|
|
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
|
|
|
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.
|

05-25-2008, 09:27 PM
|
|
Regular
|
|
Join Date: Sep 2003
Location: M'sia
Posts: 68
|
|
|
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?
|

05-27-2008, 07:24 AM
|
 |
Disillusioned Code Poet
Retired Moderator * Guru *
|
|
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
|
|
|
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.
|

06-12-2008, 07:36 PM
|
|
Regular
|
|
Join Date: Sep 2003
Location: M'sia
Posts: 68
|
|
Thanks a lot, lebb. 
|
__________________
Nothing last forever, then what makes love an exception?
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|