Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Debugging a UserControl

Posted on 2000-05-12
7
Medium Priority
?
216 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

604 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