Solved

Debugging a UserControl

Posted on 2000-05-12
7
213 Views
Last Modified: 2013-11-26
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?
0
Comment
Question by:BALAJI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 3

Expert Comment

by:jjmartin
ID: 2805413
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.
0
 
LVL 14

Accepted Solution

by:
wsh2 earned 50 total points
ID: 2805510
Load the ActiveX Control source code into the IDE.. then from the VB Menu do an Add (Standard.Exe) Project.. add your Control to Form1.. and you are all set to test.. <smile>.
0
 

Expert Comment

by:rfyl
ID: 2805516
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:BALAJI
ID: 2805529
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?
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2805551
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>.

0
 

Expert Comment

by:rfyl
ID: 2806239
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".


0
 

Author Comment

by:BALAJI
ID: 2812539
worked thanks
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question