1
Answer

Debug ActiveX control from C#

Photo of gajesh

gajesh

18y
2.3k
1
Hi all,

I am using MFC - ActiveX control in C# based windows application.
I am not able to debug the control with the C# application while it is possible with the MFC applcation.

I want to call a function on buttton click event of windows application.
The function is in ActiveX control.

I have given the path of the exe in control also enabled the Unmanaged debugging in Windows application, but when i start debug it doesn't populate the exe, instead it comes out and ready for debug again.

Is it possible to do so if yes then HOW.

Thanks.

Gajesh
Pune(India)

Answers (1)

0
Photo of Dipen Lama
NA 331 195.9k 18y
Use Place holder control to place the user control dynamically.
Here is some lines:

    string userControlName = "UserControl1.ascx"; 
 
    Control control1 ;
    control1 = LoadControl( userControlName );
    placeHolderControl1.Controls.Clear();
    placeHolderControl1.Controls.Add( control1 );