Windowless ActiveX controls are not supported - DOTNET

This is a discussion on Windowless ActiveX controls are not supported - DOTNET ; Hi everybody, I using VS.NET 2005 Pro to develop win form application and I need include an activex control to show information, this works good In developing time but after deploy doesn't work it, I try to running in a ...

+ Reply to Thread
Results 1 to 7 of 7

Windowless ActiveX controls are not supported

  1. Default Windowless ActiveX controls are not supported

    Hi everybody,

    I using VS.NET 2005 Pro to develop win form application and I need include
    an activex control to show information, this works good In developing time
    but after deploy doesn't work it, I try to running in a clean machine with
    framework 2.0 installed

    I found this error 'Unable to get the window handle for the 'AxMyActivex'
    control. Windowless ActiveX controls are not supported.' when I tray to show
    the form with actvex control.

    Please, could you someone help me?.

    Regards,
    Alfredo

  2. Default Re: Windowless ActiveX controls are not supported

    Alfredo Delgadillo wrote:

    > I found this error 'Unable to get the window handle for the 'AxMyActivex'
    > control. Windowless ActiveX controls are not supported.' when I tray to show
    > the form with actvex control.


    Wild shot, but the one time I encountered something like this
    it was related to some enhanced virus protection feature of
    the CPU (Data Execution Prevention / DEP), in which case it
    could be prevented using NoExecute=AlwaysOff in boot.ini.

    http://support.microsoft.com/kb/875352

  3. Default Re: Windowless ActiveX controls are not supported

    This solution doesn't work for me, this error continues being shown.

    I try this options:

    1) I set Data Execution Prevention in Advanced properties of my machine to
    second option 'Turn on DEP fo all programs and services except I select', and
    I add my application, it doesn't work.

    2) I was modified boot.ini file changing /noexecute value from
    /noexecute=optin to /noexecute=AllwaysOff, it doesn't work too.

    do you have any other recomendation?



    "Christian Fröschlin" wrote:

    > Wild shot, but the one time I encountered something like this
    > it was related to some enhanced virus protection feature of
    > the CPU (Data Execution Prevention / DEP), in which case it
    > could be prevented using NoExecute=AlwaysOff in boot.ini.
    >
    > http://support.microsoft.com/kb/875352
    >


  4. Default Re: Windowless ActiveX controls are not supported

    On Tue, 16 May 2006 13:07:02 -0700, Alfredo Delgadillo
    <AlfredoDelgadillo@discussions.microsoft.com> wrote:

    >Hi everybody,
    >
    >I using VS.NET 2005 Pro to develop win form application and I need include
    >an activex control to show information, this works good In developing time
    >but after deploy doesn't work it, I try to running in a clean machine with
    >framework 2.0 installed
    >
    >I found this error 'Unable to get the window handle for the 'AxMyActivex'
    >control. Windowless ActiveX controls are not supported.' when I tray to show
    >the form with actvex control.
    >
    >Please, could you someone help me?.
    >
    >Regards,
    >Alfredo


    I reckon you might be having some threading issues. Try putting all
    your calls in a try catch block and see if you get any exceptions.

  5. Default Re: Windowless ActiveX controls are not supported

    Hi Andy, this the error detail

    |--->Error Type: InvalidOperationException
    |--->Rutine: EnsureWindowPresent
    |--->Description: Unable to get the window handle for the
    'AxctrProject' control. Windowless ActiveX controls are not supported.

    Stack Trace:
    at System.Windows.Forms.AxHost.EnsureWindowPresent()
    at System.Windows.Forms.AxHost.InPlaceActivate()
    at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
    at System.Windows.Forms.AxHost.CreateHandle()
    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    at System.Windows.Forms.AxHost.EndInit()
    at Name.Detail.TS20.frmForm1.InitializeComponent()
    at Name.Detail.TS20.frmForm1..ctor(Boolean blnAll)
    at Name.Detail.TS20.frmMain.ExecuteAction(String key, Boolean blnExe)

    Each block has a try and cach exception.

    > I reckon you might be having some threading issues. Try putting all
    > your calls in a try catch block and see if you get any exceptions.
    >


  6. Default Re: Windowless ActiveX controls are not supported

    On Thu, 18 May 2006 05:36:02 -0700, Alfredo Delgadillo
    <AlfredoDelgadillo@discussions.microsoft.com> wrote:

    >Hi Andy, this the error detail
    >
    > |--->Error Type: InvalidOperationException
    > |--->Rutine: EnsureWindowPresent
    > |--->Description: Unable to get the window handle for the
    >'AxctrProject' control. Windowless ActiveX controls are not supported.
    >
    >Stack Trace:
    > at System.Windows.Forms.AxHost.EnsureWindowPresent()
    > at System.Windows.Forms.AxHost.InPlaceActivate()
    > at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
    > at System.Windows.Forms.AxHost.CreateHandle()
    > at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    > at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    > at System.Windows.Forms.AxHost.EndInit()
    > at Name.Detail.TS20.frmForm1.InitializeComponent()
    > at Name.Detail.TS20.frmForm1..ctor(Boolean blnAll)
    > at Name.Detail.TS20.frmMain.ExecuteAction(String key, Boolean blnExe)
    >
    >Each block has a try and cach exception.
    >


    Without seeing the code, its hard to know what you are doing.

    You need to remmeber that the active x control will run on a seperate
    thread, and to allow access to the winform thread you need to provide
    some kind of thread safe access, typically through invoke.

    CAn you get access to VS2003? I beleive the cross threading stuff was
    less strictly enforced in 2003.

  7. Default Re: Windowless ActiveX controls are not supported


    "The Real Andy" <will_get_back_to_you_on_This@b.c> wrote in message
    news:b31r62dn2stadsafa8g04vgih3b64m8m79@4ax.com...
    | On Thu, 18 May 2006 05:36:02 -0700, Alfredo Delgadillo
    | <AlfredoDelgadillo@discussions.microsoft.com> wrote:
    |
    | >Hi Andy, this the error detail
    | >
    | > |--->Error Type: InvalidOperationException
    | > |--->Rutine: EnsureWindowPresent
    | > |--->Description: Unable to get the window handle for the
    | >'AxctrProject' control. Windowless ActiveX controls are not supported.
    | >
    | >Stack Trace:
    | > at System.Windows.Forms.AxHost.EnsureWindowPresent()
    | > at System.Windows.Forms.AxHost.InPlaceActivate()
    | > at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
    | > at System.Windows.Forms.AxHost.CreateHandle()
    | > at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    | > at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    | > at System.Windows.Forms.AxHost.EndInit()
    | > at Name.Detail.TS20.frmForm1.InitializeComponent()
    | > at Name.Detail.TS20.frmForm1..ctor(Boolean blnAll)
    | > at Name.Detail.TS20.frmMain.ExecuteAction(String key, Boolean blnExe)
    | >
    | >Each block has a try and cach exception.
    | >
    |
    | Without seeing the code, its hard to know what you are doing.
    |
    | You need to remmeber that the active x control will run on a seperate
    | thread, and to allow access to the winform thread you need to provide
    | some kind of thread safe access, typically through invoke.

    Hold on, ActiveX controls must be marked as ThreadingModel= Apartment in the
    registry, that is they must run in a STA, assumed that the Form runs in an
    STA, the Control also runs in the same STA (same thread).
    To the OP, check your controls' apartment requirements.

    Willy.



+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 12-21-2007, 12:17 PM
  2. ActiveX controls
    By Application Development in forum CSharp
    Replies: 0
    Last Post: 11-27-2007, 03:09 PM
  3. Using standard Windows Forms controls as ActiveX controls
    By Application Development in forum DOTNET
    Replies: 4
    Last Post: 10-22-2007, 01:06 AM
  4. Using Windows Forms Controls as ActiveX controls
    By Application Development in forum DOTNET
    Replies: 2
    Last Post: 10-18-2007, 04:01 AM
  5. ActiveX Controls in .NET
    By Application Development in forum DOTNET
    Replies: 3
    Last Post: 10-20-2003, 07:14 PM