BALAJI
asked on
Debugging a UserControl
Originally I created a class module for use with my program. Just recently I ported it over into an ActiveX UserControl so I would have more portablity. But now how can I step through the code line by line as a form calls its properties/methods. Since it used to be a class in my project i just would either place a break line or pause and F8 to step through it. Now its compiled into an .ocx so is there any debugging methods avaialable?
There is not debugging a compiled OCX. You will have to include it as a user control if you want to have design time debugging.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You will have to create a project group with two projects:
1) Your project that uses your control.
2) Your project that is the user control.
You should then be able to perform design-time debugging.
1) Your project that uses your control.
2) Your project that is the user control.
You should then be able to perform design-time debugging.
ASKER
As of now I just added the usercontrol to my exsisting project as jjmartin said.
But rfyl how does your method work? how can I referance the usercontrol in the second project? I wouldn't know how to do what your saying but it sounds interesting, can you give me more detial on you to accomplish this?
But rfyl how does your method work? how can I referance the usercontrol in the second project? I wouldn't know how to do what your saying but it sounds interesting, can you give me more detial on you to accomplish this?
Load the ActiveX Control source code into the VB IDE.. then from the VB Menu do an Add (Standard.Exe) Project.. your control will appear in the toolbox at the bottom of the window (labelled UserControl).. double click on it to add it to Form1.. add whatever code you like.. and you are all set to test.. <smile>.
Sorry, yes - what wsh had said is more or less what I said.
Just by having the two projects loaded in together should mean that your project using the control will reference the other one in design mode. (As the design-time one will be registered).
Make sure that you right-click your project which is using the control and "Set as start up".
Just by having the two projects loaded in together should mean that your project using the control will reference the other one in design mode. (As the design-time one will be registered).
Make sure that you right-click your project which is using the control and "Set as start up".
ASKER
worked thanks