?
Solved

Debugging a UserControl

Posted on 2000-05-12
7
Medium Priority
?
214 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 200 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
Industry Leaders: 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

764 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