Link to home
Create AccountLog in
Avatar of guyvaio
guyvaio

asked on

Use .Net Windows Control in a VFP form

I try to use .net Visual Component developed with Visual Studio 2005 (C#) in a Visual FoxPro form.

I've just created a new "Windows Control Library" in VS2005. I've put a RichTextBox on it. And I've make it COM visible. I've register successfully this assembly with REGASM /CODEBASE.

I a VFP form, I've put a button with this code:

thisForm.AddObject('test','olecontrol','WindowsControlLibrary2.UserControl1')
thisForm.test.visible=.T.

But nothing appears on this form.

Thanks in advance for help.

Regards,

Guy
ASKER CERTIFIED SOLUTION
Avatar of mikegagnon
mikegagnon

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of guyvaio
guyvaio

ASKER

I've read many information regarding the coimpatibility between VFP and .net, i've read all the articles of Rick Stahl, but just miss this one !
Many thanks,
Guy