Thanks Tracy - I'll take a look at that. Will let you know if I need some help Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 14 March 2019 15:33 To: profoxtech@leafe.com Subject: RE: Using WPF controls on Foxpro forms
Sent by an external sender ------------------------------
Here's the page that helped me put a WinForms control to ActiveX https://www.codeguru.com/csharp/.net/net_general/comcom/article.php/c16257/C reate-an-ActiveX-using-a-Csharp-Usercontrol.htm
There is a control in the Toolbox under the WPF Interoperability section "ElementHost" that allows you to host the WPF object.
I found you need to create the WPF object first, before you drop that control on to the WinForms User Control.
If you want more help. I have more time now. The FoxBin2Prg discovery was my production problem. I'm in the process of building test builds for release.
Happy Coding, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, March 14, 2019 11:14 AM To: profoxtech@leafe.com Subject: RE: Using WPF controls on Foxpro forms
I really wanted to use the WPF control rather than the Winforms control because the WPF control supports spell checking ...
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 14 March 2019 15:03 To: profoxtech@leafe.com Subject: RE: Using WPF controls on Foxpro forms
Sent by an external sender ------------------------------
It is possible. It isn't the easiest thing to do. Craig Boyd had written an article on it. But it refers to another article that he wrote I can't find. I successfully did the WPF thing to VFP a few weeks ago, but it isn't a pretty thing. You need to create the WPF side. Then you need to create a WinForms side. Then you need to expose that WinForms object as an ActiveX control. Then it needs to be properly signed so it can be used.
You might be able to use the WinForms RichText control. The link I need to share with you, since the Interop tool doesn't work with VS 2017, is on my laptop. I'm in the process of tracking down a production problem app, so I'll get that link for you later.
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Thursday, March 14, 2019 10:58 AM To: profoxtech@leafe.com Subject: Using WPF controls on Foxpro forms
Hi all
Does anybody know (a) if this is even possible and (b) how I would go about creating a DLL that would allow me to drop a UserControl onto a VFP form. The UserControl would need to act as a container for a WPF RichTextBox together with a few buttons.
Has anybody ever done anything like this? Thanks
Paul Newton
[excessive quoting removed by server]