Solved

Debugging a UserControl

Posted on 2000-05-12
7
207 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
  • 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now