Solved

Debugging a UserControl

Posted on 2000-05-12
7
210 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

776 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