how to call dotnetUsercontrol events in vb6.0 application?
here have problem have created 1 dotnet usercontrol , calling control in vb6.0.here 1 problem there. here have controls in dotnetcontrol textbox ,combobox etc.her want save control values in database table. possible clicking button located on dotnetusercontrl. here have save button on vb6.0 form calling dotnetusercontrl.here want save values in database clicking save button located on vb6.0 form. problem here not getting logic how can capture buttonclick event of on dotnet control , how can call that event from dotnetcontrol in vb6.0 button click event.
please understand , please give suggestion .
thank's
vsbabu
when use .net usercontrol in vb6, .net usercontrol compiled com. expose events of usercontrol, need pack events exposed interface, applied interfacetypeattribute , apply interface control class. following sample.
[interfacetype(cominterfacetype.interfaceisidispatch)] public interface imycontrolcomevents { [dispid(0x60020000)] void myevent(); } [comsourceinterfaces(typeof(imycontrolcomevents))] public partial class mycontrol : usercontrol { ......... } likewise, there visual basic example in following link shows managed server event source , com client event sink. managed server declares buttonevents event sink interface , connects interface button class. unmanaged client creates instance of button class , implements event sink interface. please read article , try sample code: how to: raise events handled com sink
.NET Framework > Common Language Runtime Internals and Architecture
Comments
Post a Comment