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:[email protected]] On Behalf Of Paul
Newton
Sent: Thursday, March 14, 2019 11:14 AM
To: [email protected]
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 <[email protected]> On Behalf Of Tracy Pearson
Sent: 14 March 2019 15:03
To: [email protected]
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:[email protected]] On Behalf Of Paul
Newton
Sent: Thursday, March 14, 2019 10:58 AM
To: [email protected]
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]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to