Using WinForms control in an Access application through interop

3 posts, 1 answers
  1. Kris
    Kris avatar
    2 posts
    Member since:
    Jun 2011

    Posted 20 Jun 2011 Link to this post

    We are trying to migrate an Access application to .Net.  To do this we use Microsoft's interop toolkit which allows us to create ActiveX controls in .Net.  So what it basically comes down to is this: we create a new interop user control, place some WinForms controls on it, build and register the assembly and use it in Access.

    After some extensive tests we noticed that Telerik's WinForm controls do not behave well in an Access environment.  In a .Net application the controls work just fine.

    Here's some examples of things we've seen:

    • RadGridView: crashes when leaving cells with a RadSpinEditor as their editing control.  The application shuts down without showing an error.  The event log mentions exception 0xc0000fd, which appears to be a stack overflow.
    • RadGridView: columns using RadSpinEditor cannot be edited.
    • RadContextMenu: navigating through the menu using the arrow keys scrolls 3 items up or down instead of one.

    I know the controls are not exactly intended to be used like this, but is there anyone else who had similar experiences with the WinForms controls?  And has a solution to make the controls more stable?


    Greetings,

    Kris
  2. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 23 Jun 2011 Link to this post

    Hi Kris,

    Thank you for the question.

    Our controls are designed to work properly in fully managed environment. It is possible to use RadGridView in such environment using interops, but we can not guarantee the normal processing of events and message loops. Using interops usually causes performance issues. 
    Because of all this my suggestion is to migrate your application to managed code using the .Net Framework. Or, you can try implementing all the UI and the data part in one fully managed module that communicates with the rest of the application using services or inter-process communication.

    I also will mention that in order to use RadControls in an ActiveX scenario, you should first wrap them as it is demonstrated in the following article: Wrapping a .NET user control as an ActiveX.

    I hope this helps.

    Greetings,
    Peter
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Kris
    Kris avatar
    2 posts
    Member since:
    Jun 2011

    Posted 23 Jun 2011 Link to this post

    Hello Peter,

    Thank you for your answer.  We also had our doubts whether wrapping .Net controls as ActiveX and using them in Access would be a good idea.  We'll try a different (and safer) approach for our migration project.

    Greetings,

    Kris
Back to Top