VB6 and VB.NET interoperability using com.visible -
please see code below:
imports system.runtime.interopservices public class testclass <comvisible(true)> _ public function hello() string return "hello ian" end function public function goodbye() string return "goodbye ian" end function end class
i have created type library using regasm , have added reference tlb in vb6 project. code vb6 below:
private sub form_load() dim tc testclass set tc = new testlibrary.testclass msgbox (tc.hello) msgbox (tc.goodbye) end sub
i not understand why message prints value of: tc.goodbye not visible.
i believe because default value true. there way set default value false.
Comments
Post a Comment