ATL ActiveX in C# User Control crashing designer



Hi,

I'm using a ATL ActiveX on a C# windows form (Visual studio 2005).
That works great. However, I wanted to create a C# user control which
would wrap this ActiveX. Therefor I created an empty user control and
just put this ActiveX on it. No problem so far.

However, when I wanted to test this dummy User Control, I put this
user control on its turn on a c# form.
That's when it started to go wrong. Once it is put on the form, I can
not move it anymore and when I click in the user control I get an
error saying that an unhandled exception caused the designer to crash.
In the activex there is a stack trace displayed:
...UnsafeNativeMethods.IOleInplace.UIDeactivate
at ...AxHost.UiDeactivate
at....AxHost.OnLostFocus...

I hooked up an instance of Visual studio 2003 to debug the Visual
studio 2005.
And it seems it is going wrong in the
::SetFocus call in SetControlFocus(TRUE) which is called from
CComControlBase::InPlaceActivate(LONG iVerb, const RECT* /
*prcPosRect*/) in atlctl.h

Anybody any ideas why an activex is making the designer go bananas
like this? And how to prevent it?

Kind Regards,
Jeroen

.



Relevant Pages

  • Re: Permission Denied error
    ... I have two apps: App 1: VB Exe on the CLient, App 2: ActiveX dll on a remote ... This VB Exe-application connects to the ActiveX DLL though DCOM. ... in my client-app I have a user control added. ...
    (comp.lang.basic.visual.misc)
  • ATL ActiveX in C# User Control crashing designer
    ... I'm using a ATL ActiveX on a C# windows form. ... Therefore I created an empty user control and ... error saying that an unhandled exception caused the designer to crash. ... I hooked up an instance of Visual studio 2003 to debug the Visual ...
    (microsoft.public.dotnet.framework.interop)
  • Re: ATL ActiveX in C# User Control crashing designer
    ... Microsoft says that ActiveX can run in the thread with STA parameter (by ... Therefore I created an empty user control and ... error saying that an unhandled exception caused the designer to crash. ... I hooked up an instance of Visual studio 2003 to debug the Visual ...
    (microsoft.public.dotnet.framework.interop)
  • Permission Denied error
    ... I have two apps: App 1: VB Exe on the CLient, App 2: ActiveX dll on a remote ... This VB Exe-application connects to the ActiveX DLL though DCOM. ... in my client-app I have a user control added. ...
    (comp.lang.basic.visual.misc)
  • Designer load error
    ... I have a perfectly good user control that I work in for an hour. ... Visual Studio for whatever reason and start it back up to continue working ... on the control only to be greeted with a nice error telling me the designer ...
    (microsoft.public.dotnet.framework.windowsforms.designtime)