This is a migrated thread and some comments may be shown as answers.

Using WinForms control in an Access application through interop

2 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kris
Top achievements
Rank 1
Kris asked on 20 Jun 2011, 09:45 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 23 Jun 2011, 09:38 AM
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.
0
Kris
Top achievements
Rank 1
answered on 23 Jun 2011, 10:04 AM
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
Tags
General Discussions
Asked by
Kris
Top achievements
Rank 1
Answers by
Peter
Telerik team
Kris
Top achievements
Rank 1
Share this question
or