Click here to Skip to main content
       

.NET Framework

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionDevelop COM class / ActiveX with data bound properties in .NET?membervware4 Jun '12 - 8:55 
I posted this question in "Quick Answers", no replies so far, I hope I am having more luck on here...
 
I've re-developed a ActiveX control in C# (basically a drop-in replacement for a age-old VB6 control). Most things work, however, I need to implement property data binding for it.
 
In VB6, that was an easy thing to do, thanks to the dialog here: Binding a Control to a Data Source. Simply checking the first 3 options in "Data Binding" would do the trick, and COM-aware applications could bind data to the control.
 

A similar problem has surfaced already, it seems, with quite a complicated workaround:
 
You might have to reverse engineer some of the generated code to do this. Offhand, I would create the TLB file, and then use OLEVIEW to view
the IDL.
 
Then, I would copy and paste the IDL into a new file, and add the
bindable attribute to the idl in the appropriate places. Once that is done,
I would run that IDL file through MIDL, and create a type library. Once you
do that, you should be able to register that type library to create your
CCW's.
 
It seems there is no facility in .NET to add the [bindable] attribute to a COM class.
 
Please, any help with this would be greatly appreciated!

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 21 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid